-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Our unit tests do a lot of assert!((...).is_ok()) or assert!((...).is_err()), which in case of test failures produces very unhelpful messages (e.g. if an assertion on is_ok() fails, it just prints "assert failed: false", without printing what the error variant that we actually received was). The .is_ok() assertions, we can just replace with .unwrap()s, while the is_err() assertions can either become .unwrap_err(), if we dont care about the actual error returned, or assert_matches!((...).unwrap_err(), expected error), if we do. After this is all set and done, we should add #![warn(clippy(assertions_on_result_states)] to lib.rs.
This is mostly busywork, and there are around 50 instances of this.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers