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
|
@ -32,7 +32,7 @@ pub fn shutdown(self: *Self) void {
|
|||
}
|
||||
|
||||
// pub fn send(self: *Self, m: tp.message) tp.result {
|
||||
// const pid = if (self.pid) |pid| pid else return tp.exit_error(error.Shutdown);
|
||||
// const pid = self.pid orelse return tp.exit_error(error.Shutdown);
|
||||
// try pid.send(m);
|
||||
// }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue