diff options
Diffstat (limited to 'crates/ra_editor/src/line_index.rs')
-rw-r--r-- | crates/ra_editor/src/line_index.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_editor/src/line_index.rs b/crates/ra_editor/src/line_index.rs index da0f2a7f7..9abbb0d09 100644 --- a/crates/ra_editor/src/line_index.rs +++ b/crates/ra_editor/src/line_index.rs | |||
@@ -29,10 +29,10 @@ impl LineIndex { | |||
29 | let line = self.newlines.upper_bound(&offset) - 1; | 29 | let line = self.newlines.upper_bound(&offset) - 1; |
30 | let line_start_offset = self.newlines[line]; | 30 | let line_start_offset = self.newlines[line]; |
31 | let col = offset - line_start_offset; | 31 | let col = offset - line_start_offset; |
32 | return LineCol { | 32 | LineCol { |
33 | line: line as u32, | 33 | line: line as u32, |
34 | col, | 34 | col, |
35 | }; | 35 | } |
36 | } | 36 | } |
37 | 37 | ||
38 | pub fn offset(&self, line_col: LineCol) -> TextUnit { | 38 | pub fn offset(&self, line_col: LineCol) -> TextUnit { |