3 #![warn(clippy::result_map_or_into_option)]
6 let opt: Result<u32, &str> = Ok(1);
7 let _ = opt.map_or(None, Some);
9 let rewrap = |s: u32| -> Option<u32> { Some(s) };
11 // A non-Some `f` arg should not emit the lint
12 let opt: Result<u32, &str> = Ok(1);
13 let _ = opt.map_or(None, rewrap);