Closed
Description
What it does
It denies any form of assert!(r.is_ok())
. Instead, it suggests to use r.unwrap()
directly.
Lint Name
No response
Category
style
Advantage
- In tests, using an
unwrap()
displays the specific offending error and helps diagnosis.
Drawbacks
No response
Example
#[test]
fn test_dummy() {
let r = do_test();
assert!(r.is_ok());
}
Could be written as:
#[test]
fn test_dummy() {
do_test().unwrap();
}