refactor: prefer orelse to if(pred) |x| x else y
This commit is contained in:
parent
1caf2aa0f6
commit
c01576412a
15 changed files with 43 additions and 43 deletions
|
@ -136,6 +136,6 @@ pub const List = struct {
|
|||
if (consume)
|
||||
return true;
|
||||
}
|
||||
return if (e) |e_| e_ else false;
|
||||
return e orelse false;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue