if $c:expr { Some($r:expr) } else { None }
=>> $c.then(|| $r)
This commit is contained in:
parent
af3c8b2726
commit
8751fa1a9a
54 changed files with 159 additions and 281 deletions
|
@ -835,7 +835,7 @@ impl<'a> Parser<'a> {
|
|||
);
|
||||
}
|
||||
|
||||
if found { Some(cur) } else { None }
|
||||
found.then(|| cur)
|
||||
}
|
||||
|
||||
fn suggest_format(&mut self) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue