Can't run cargo test

I cloned the repo. Went to rslib. And ran cargo test. I go errors in two files that Eq is not implemented

 #[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone)]
    |                                             -- in this derive macro expansion
...
125 |     review_limit_today: Option<DayLimit>,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `DayLimit`
    |
    = help: the trait `std::cmp::Eq` is implemented for `std::option::Option<T>`
    = note: required because of the requirements on the impl of `std::cmp::Eq` for `std::option::Option<DayLimit>`
note: required by a bound in `AssertParamIsEq`
    = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `DayLimit` with `#[derive(Eq)]`
   --> |t/anki.decks.rs:76:9
    |
76  |         #[derive(Eq)]
    |

error[E0277]: the trait bound `ForeignCard: std::cmp::Eq` is not satisfied
  --> rslib/src/import_export/text/mod.rs:33:5
   |
25 | #[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)]
   |                                   -- in this derive macro expansion
...
33 |     cards: Vec<ForeignCard>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `ForeignCard`

Works for me. Maybe you need to run rustup update?

2 Likes