use then
This commit is contained in:
parent
75530e9f72
commit
7a8cdf00e6
1 changed files with 1 additions and 5 deletions
|
@ -1704,11 +1704,7 @@ pub trait Iterator {
|
|||
/// self.state = self.state + 1;
|
||||
///
|
||||
/// // if it's even, Some(i32), else None
|
||||
/// if val % 2 == 0 {
|
||||
/// Some(val)
|
||||
/// } else {
|
||||
/// None
|
||||
/// }
|
||||
/// (val % 2 == 0).then_some(val)
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue