Skip to content
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

Merged
merged 16 commits into from Mar 20, 2024
Merged

Conversation

six-shot
Copy link
Contributor

@six-shot six-shot commented Mar 20, 2024


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes are part of Fix as many clippy problems as possible #31500
  • These changes do not require tests because they just fix clippy warnings.

@@ -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;
Copy link
Member

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.

self.taken_task_counter
.set(self.taken_task_counter.get() + 1);
throttled_length = throttled_length - 1;
throttled_length - 1;
Copy link
Member

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.

@@ -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;
Copy link
Member

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.

Suggested change
throttled_length - =1;
throttled_length - =1;

@six-shot six-shot requested a review from mrobinson March 20, 2024 14:10
Copy link
Member

@mrobinson mrobinson left a 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!

@mrobinson mrobinson changed the title clippy: Fix clippy problems in components/script clippy: Fix some clippy problems in components/script Mar 20, 2024
@six-shot
Copy link
Contributor Author

Thanks for these fixes!

Yes sir

@mrobinson mrobinson added this pull request to the merge queue Mar 20, 2024
Merged via the queue into servo:main with commit 058319a Mar 20, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants