2019-04-18 08:12:59 +02:00
|
|
|
// run-rustfix
|
|
|
|
|
2020-04-25 22:33:11 +02:00
|
|
|
#![allow(clippy::bind_instead_of_map)]
|
2019-08-16 04:42:07 +02:00
|
|
|
|
2019-04-18 08:12:59 +02:00
|
|
|
fn main() {
|
|
|
|
let opt = Some(1);
|
|
|
|
|
|
|
|
// Check `OPTION_MAP_OR_NONE`.
|
|
|
|
// Single line case.
|
|
|
|
let _ = opt.and_then(|x| Some(x + 1));
|
|
|
|
// Multi-line case.
|
|
|
|
#[rustfmt::skip]
|
|
|
|
let _ = opt.and_then(|x| {
|
|
|
|
Some(x + 1)
|
|
|
|
});
|
|
|
|
}
|