Fix clippy::len_zero

This commit is contained in:
Alan Du 2019-06-04 02:28:22 -04:00
parent 7bcd8d6290
commit 619a615298
3 changed files with 5 additions and 5 deletions

View file

@ -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);
}