diff options
author | Rosemary Ajayi <okhuomonajayi54@gmail.com> | 2024-03-20 18:41:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-20 18:41:07 +0000 |
commit | 058319aa0b9dbf1916dd87f27171bccd051be3e3 (patch) | |
tree | 0f3ba0d1322b8ac378fb37805f7720f00280625e /components/script/task_queue.rs | |
parent | 3651b650c48ba8cf1b8f00f4be9705ac11b68a8c (diff) | |
download | servo-058319aa0b9dbf1916dd87f27171bccd051be3e3.tar.gz servo-058319aa0b9dbf1916dd87f27171bccd051be3e3.zip |
clippy: Fix some clippy problems in `components/script` (#31778)
* fix clippy problems in stylesheet
* fix clippy problems in task_manager
* fix clippy problems in task_queue
* fix clippy problems in task_queue
* fix clippy problems in file_reading
* fix clippy problems in dom_manipulation
* fix clippy problems in gamepad
* fix clippy problems in networking
* fix clippy problems in performance
* fix clippy problems in port_message
* fix clippy problems in port_message
* fix clippy problems in timer
* fix clippy problems in stylesheet
* fix clippy problems
* fix clippy problems
* fix clippy problems
Diffstat (limited to 'components/script/task_queue.rs')
-rw-r--r-- | components/script/task_queue.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/task_queue.rs b/components/script/task_queue.rs index a3de0c4b52f..1fac477865e 100644 --- a/components/script/task_queue.rs +++ b/components/script/task_queue.rs @@ -86,7 +86,7 @@ impl<T: QueuedTaskConversion> TaskQueue<T> { /// <https://html.spec.whatwg.org/multipage/#event-loop-processing-model:fully-active> fn store_task_for_inactive_pipeline(&self, msg: T, pipeline_id: &PipelineId) { let mut inactive = self.inactive.borrow_mut(); - let inactive_queue = inactive.entry(pipeline_id.clone()).or_default(); + let inactive_queue = inactive.entry(*pipeline_id).or_default(); inactive_queue.push_back( msg.into_queued_task() .expect("Incoming messages should always be convertible into queued tasks"), @@ -152,7 +152,7 @@ impl<T: QueuedTaskConversion> TaskQueue<T> { } } // Immediately send non-throttled tasks for processing. - let _ = self.msg_queue.borrow_mut().push_back(msg); + self.msg_queue.borrow_mut().push_back(msg); } for msg in to_be_throttled { @@ -237,16 +237,16 @@ impl<T: QueuedTaskConversion> TaskQueue<T> { // Reduce the length of throttles, // but don't add the task to "msg_queue", // and neither increment "taken_task_counter". - throttled_length = throttled_length - 1; + throttled_length -= 1; continue; } } // Make the task available for the event-loop to handle as a message. - let _ = self.msg_queue.borrow_mut().push_back(msg); + self.msg_queue.borrow_mut().push_back(msg); self.taken_task_counter .set(self.taken_task_counter.get() + 1); - throttled_length = throttled_length - 1; + throttled_length -= 1; }, } } |