-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unit_cmp: special handling of assert_eq!(Option.unwrap(), ()); #4661
Comments
I've been working on this a bit, but I'm having trouble getting the left and right sides of the |
There will be a utils function for this (hopefully) soon, see #4694 |
Yes and no. The
Would be a smart play :) |
Would it make sense to allow cases where either left or right is explicitly My usecase is testing that a macro i wrote always evaluates to |
Maybe OTOH, For |
Clippy warns here ``assert_eq
of unit values detected. This will always succeed
, however this code will actually check and panic if x is None.Can we suggest to replace it with
assert!(x.is_some())
in this case?Found in cargo codebase of cargo.
clippy 0.0.212 (5cb9833 2019-10-08)
The text was updated successfully, but these errors were encountered: