add multi-line test case

This commit is contained in:
togami2864 2021-11-18 00:13:55 +09:00
parent 7605bac2cb
commit e34927ecf6

View File

@ -16,4 +16,9 @@ fn main() {
});
// function returning `Option`
let _: Option<i32> = opt.map_or(None, bar);
let _: Option<i32> = opt.map_or(None, |x| {
let offset = 0;
let height = 1;
Some(offset + height)
});
}