mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 22:31:14 +00:00
Janitor: Fix clippy::len_zero
This commit is contained in:
parent
8d83ce88d7
commit
d64291245e
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue