add multi-line test case
This commit is contained in:
parent
7605bac2cb
commit
e34927ecf6
@ -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)
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user