Janitor: Fix clippy::len_zero

This commit is contained in:
Tobias Hunger 2021-07-22 14:44:54 +02:00 committed by Simon Hausmann
parent 8d83ce88d7
commit d64291245e
2 changed files with 2 additions and 2 deletions

View file

@ -392,7 +392,7 @@ impl Expression {
Stop::Finished => {} Stop::Finished => {}
Stop::Color(col) => stops.push(( Stop::Color(col) => stops.push((
col, col,
if stops.len() == 0 { if stops.is_empty() {
Expression::NumberLiteral(0., Unit::None) Expression::NumberLiteral(0., Unit::None)
} else { } else {
Expression::Invalid Expression::Invalid

View file

@ -545,7 +545,7 @@ impl TextInput {
fn delete_selection(self: Pin<&Self>) { fn delete_selection(self: Pin<&Self>) {
let text: String = self.text().into(); let text: String = self.text().into();
if text.len() == 0 { if text.is_empty() {
return; return;
} }