clippy: Use if lets and remove redundant returns
This commit is contained in:
@@ -29,10 +29,10 @@ impl LineIndex {
|
||||
let line = self.newlines.upper_bound(&offset) - 1;
|
||||
let line_start_offset = self.newlines[line];
|
||||
let col = offset - line_start_offset;
|
||||
return LineCol {
|
||||
LineCol {
|
||||
line: line as u32,
|
||||
col,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
pub fn offset(&self, line_col: LineCol) -> TextUnit {
|
||||
|
||||
Reference in New Issue
Block a user