diff options
author | Azhar Ismagulova <31756707+azharcodeit@users.noreply.github.com> | 2024-04-09 10:34:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-09 09:34:52 +0000 |
commit | 581913f77eeca88171607c117a6ea32127f5693b (patch) | |
tree | 8e688f5814d142ec1359d61198e471f173b3e3da /components/script/dom/htmlinputelement.rs | |
parent | 8d513cf4c78c9bb984d204f190ad3f9916f925a3 (diff) | |
download | servo-581913f77eeca88171607c117a6ea32127f5693b.tar.gz servo-581913f77eeca88171607c117a6ea32127f5693b.zip |
clippy: fix warnings in components/script (#32023)
Diffstat (limited to 'components/script/dom/htmlinputelement.rs')
-rwxr-xr-x | components/script/dom/htmlinputelement.rs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index 44669e7f875..de7f31af922 100755 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -708,11 +708,10 @@ impl HTMLInputElement { }, }; } else { - value = value + - match dir { - StepDirection::Down => -f64::from(n) * allowed_value_step, - StepDirection::Up => f64::from(n) * allowed_value_step, - }; + value += match dir { + StepDirection::Down => -f64::from(n) * allowed_value_step, + StepDirection::Up => f64::from(n) * allowed_value_step, + }; } // Step 8 @@ -2085,8 +2084,7 @@ impl HTMLInputElement { if self.upcast::<Element>().click_in_progress() { return; } - let submit_button; - submit_button = node + let submit_button = node .query_selector_iter(DOMString::from("input[type=submit]")) .unwrap() .filter_map(DomRoot::downcast::<HTMLInputElement>) @@ -2102,7 +2100,7 @@ impl HTMLInputElement { } }, None => { - let inputs = node + let mut inputs = node .query_selector_iter(DOMString::from("input")) .unwrap() .filter_map(DomRoot::downcast::<HTMLInputElement>) @@ -2125,7 +2123,7 @@ impl HTMLInputElement { ) }); - if inputs.skip(1).next().is_some() { + if inputs.nth(1).is_some() { // lazily test for > 1 submission-blocking inputs return; } |