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
|
@ -75,7 +75,7 @@ fn clear(self: *Self) void {
|
|||
}
|
||||
|
||||
fn inspect_location(self: *Self, row: usize, col: usize) void {
|
||||
const syn = if (self.editor.syntax) |p| p else return;
|
||||
const syn = self.editor.syntax orelse return;
|
||||
syn.highlights_at_point(self, dump_highlight, .{ .row = @intCast(row), .column = @intCast(col) });
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue