1 #![warn(clippy::map_err_ignore)]
2 use std::convert::TryFrom;
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));