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

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