1 #![warn(clippy::map_err_ignore)]
2 #![allow(clippy::unnecessary_wraps)]
11 impl Error for Errors {}
13 impl fmt::Display for Errors {
14 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
19 fn main() -> Result<(), Errors> {
20 let x = u32::try_from(-123_i32);
22 println!("{:?}", x.map_err(|_| Errors::Ignored));
24 // Should not warn you because you explicitly ignore the parameter
25 // using a named wildcard value
26 println!("{:?}", x.map_err(|_foo| Errors::Ignored));