From 581913f77eeca88171607c117a6ea32127f5693b Mon Sep 17 00:00:00 2001 From: Azhar Ismagulova <31756707+azharcodeit@users.noreply.github.com> Date: Tue, 9 Apr 2024 10:34:52 +0100 Subject: clippy: fix warnings in components/script (#32023) --- components/script/dom/htmlinputelement.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'components/script/dom/htmlinputelement.rs') 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::().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::) @@ -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::) @@ -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; } -- cgit v1.2.3