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(|x| x + 1);
15 let _: Option<i32> = opt.map(|x| x + 1);
16 // function returning `Option`
17 let _: Option<i32> = opt.and_then(bar);
18 let _: Option<i32> = opt.and_then(|x| {
24 // Check `RESULT_MAP_OR_INTO_OPTION`.
25 let _: Option<i32> = r.ok();