aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/src/line_index.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/line_index.rs b/crates/ra_ide_api/src/line_index.rs
index fd33d6767..087dfafed 100644
--- a/crates/ra_ide_api/src/line_index.rs
+++ b/crates/ra_ide_api/src/line_index.rs
@@ -41,7 +41,7 @@ impl LineIndex {
41 newlines.push(curr_row); 41 newlines.push(curr_row);
42 42
43 // Save any utf-16 characters seen in the previous line 43 // Save any utf-16 characters seen in the previous line
44 if utf16_chars.len() > 0 { 44 if !utf16_chars.is_empty() {
45 utf16_lines.insert(line, utf16_chars); 45 utf16_lines.insert(line, utf16_chars);
46 utf16_chars = Vec::new(); 46 utf16_chars = Vec::new();
47 } 47 }
@@ -61,7 +61,7 @@ impl LineIndex {
61 } 61 }
62 62
63 // Save any utf-16 characters seen in the last line 63 // Save any utf-16 characters seen in the last line
64 if utf16_chars.len() > 0 { 64 if !utf16_chars.is_empty() {
65 utf16_lines.insert(line, utf16_chars); 65 utf16_lines.insert(line, utf16_chars);
66 } 66 }
67 67