From 619a61529878f82daf7aed571bc4f6a10bd6dd9f Mon Sep 17 00:00:00 2001 From: Alan Du Date: Tue, 4 Jun 2019 02:28:22 -0400 Subject: Fix clippy::len_zero --- crates/ra_ide_api/src/line_index.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide_api') 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 { newlines.push(curr_row); // Save any utf-16 characters seen in the previous line - if utf16_chars.len() > 0 { + if !utf16_chars.is_empty() { utf16_lines.insert(line, utf16_chars); utf16_chars = Vec::new(); } @@ -61,7 +61,7 @@ impl LineIndex { } // Save any utf-16 characters seen in the last line - if utf16_chars.len() > 0 { + if !utf16_chars.is_empty() { utf16_lines.insert(line, utf16_chars); } -- cgit v1.2.3