New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clippy: Fix some clippy problems in components/script
#31778
Conversation
components/script/task_queue.rs
Outdated
@@ -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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was assigning throttled_length
to throttled_length - 1
, but now this statement does nothing.
components/script/task_queue.rs
Outdated
self.taken_task_counter | ||
.set(self.taken_task_counter.get() + 1); | ||
throttled_length = throttled_length - 1; | ||
throttled_length - 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same situation seems to be happening here.
components/script/task_queue.rs
Outdated
@@ -237,7 +237,7 @@ 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 - 1; | |||
throttled_length - =1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run ./mach fmt
before uploading changes.
throttled_length - =1; | |
throttled_length - =1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these fixes!
components/script
Yes sir |
./mach build -d
does not report any errors./mach test-tidy
does not report any errors