Skip to content

Commit

Permalink
fixed clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
genusistimelord committed Jul 16, 2024
1 parent 35c6f96 commit 4b6def8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/widgets/number_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,12 @@ where
Some(text) => {
if text == "\u{1}" || text == "\u{3}" {
// CTRL + a and CTRL + c
return forward_to_text(event, shell, child, clipboard);
forward_to_text(event, shell, child, clipboard)
} else if text == "\u{8}" {
// Backspace
if !T::zero().eq(&self.value) {
if T::zero().eq(&self.value) {
event::Status::Ignored
} else {
let mut new_val = self.value.to_string();
match text_input.cursor().state(&Value::new(&new_val)) {
cursor::State::Index(idx)
Expand Down Expand Up @@ -516,8 +518,6 @@ where
Ok(_) => event::Status::Captured,
_ => event::Status::Ignored,
}
} else {
event::Status::Ignored
}
} else {
let input = if text == "\u{16}" {
Expand Down

0 comments on commit 4b6def8

Please sign in to comment.