3 #![allow(clippy::bind_instead_of_map)]
7 let r: Result<i32, i32> = Ok(1);
10 // Check `OPTION_MAP_OR_NONE`.
12 let _: Option<i32> = opt.map_or(None, |x| Some(x + 1));
15 let _: Option<i32> = opt.map_or(None, |x| {
18 // function returning `Option`
19 let _: Option<i32> = opt.map_or(None, bar);
20 let _: Option<i32> = opt.map_or(None, |x| {
26 // Check `RESULT_MAP_OR_INTO_OPTION`.
27 let _: Option<i32> = r.map_or(None, Some);