Skip to content

Fix rust version consistency

Yaroslav Dynnikov requested to merge rust-version-consistency into master

Summary

  • ci: check rust version consistency

image

Also fix some fresh clippy warnings
error: the borrowed expression implements the required traits
   --> src/cas.rs:818:48
    |
818 |         assert!(t(&abort, Range::new(props).eq(&next_schema_version)).is_err());
    |                                                ^^^^^^^^^^^^^^^^^^^^ help: change this to: `next_schema_version`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `-D clippy::needless-borrow` implied by `-D clippy::all`

error: this boolean expression can be simplified
  --> src/instance.rs:55:9
   |
55 |         has_grades!(self, * -> not Offline) && has_grades!(self, * -> not Expelled)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
   = note: `-D clippy::nonminimal-bool` implied by `-D clippy::all`
help: try
   |
55 ~         !(!true || !! ] $($tail)+)
56 +     };
57 +     (@impl $i:expr; current[ $($c:tt)* ] target[] *) => {
58 +         has_grades!(@impl $i; current[ $($c)* ] target[ true ])
59 +     };
60 +     (@impl $i:expr; current[ $($c:tt)* ] target[ $($not:tt)? ] $target:ident) => {
61 +         has_grades!(@impl $i;
62 +             current[ $($c)* ]
63 +             target[
64 +                 $($not)?
65 +                 matches!($i.target_grade.variant, $crate::instance::grade::TargetGradeVariant::$target) || !! ] $($tail)+)
66 +     };
67 +     (@impl $i:expr; current[ $($c:tt)* ] target[] *) => {
68 +         has_grades!(@impl $i; current[ $($c)* ] target[ true ])
69 +     };
70 +     (@impl $i:expr; current[ $($c:tt)* ] target[ $($not:tt)? ] $target:ident) => {
71 +         has_grades!(@impl $i;
72 +             current[ $($c)* ]
73 +             target[
74 +                 $($not)?
75 +                 matches!($i.target_grade.variant, $crate::instance::grade::TargetGradeVariant::$target))
   |
55 |         has_grades!(self, * -> not Offline) && has_grades!(self, * -> not Offline) && has_grades!(self, * -> not Expelled)
   |

error: could not compile `picodata` (lib) due to 2 previous errors

Ensure that

  • New code is covered by tests
  • API is documented
  • Changelog is up to date
  • (if Lua API changed) Lua API version is bumped in luamod.rs
  • (if API docs changed) A follow-up doc issue is created in picodata/docs and linked here
Edited by Yaroslav Dynnikov

Merge request reports