mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Fix clippy::len_zero
This commit is contained in:
parent
7bcd8d6290
commit
619a615298
3 changed files with 5 additions and 5 deletions
|
@ -292,7 +292,7 @@ fn delim_to_str(d: tt::Delimiter, closing: bool) -> SmolStr {
|
|||
};
|
||||
|
||||
let idx = closing as usize;
|
||||
let text = if texts.len() > 0 { &texts[idx..texts.len() - (1 - idx)] } else { "" };
|
||||
let text = if !texts.is_empty() { &texts[idx..texts.len() - (1 - idx)] } else { "" };
|
||||
text.into()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue