mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Fix clippy::len_zero
This commit is contained in:
parent
7bcd8d6290
commit
619a615298
3 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue