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 warnings in components/net #31564

Merged
merged 4 commits into from Mar 10, 2024
Merged

clippy: fix warnings in components/net #31564

merged 4 commits into from Mar 10, 2024

Conversation

eerii
Copy link
Contributor

@eerii eerii commented Mar 7, 2024

Split from #31514, fixes some clippy warnings in components/net.


  • ./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 do not modify functionality, they only fix lint errors.

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.

Nice! Just a couple comments below:

components/net/http_loader.rs Outdated Show resolved Hide resolved
components/net/http_cache.rs Outdated Show resolved Hide resolved
components/net/http_loader.rs Outdated Show resolved Hide resolved
@servo-wpt-sync
Copy link
Collaborator

🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync.

@mrobinson mrobinson added this pull request to the merge queue Mar 10, 2024
Merged via the queue into servo:main with commit 67b277c Mar 10, 2024
9 checks passed
@eerii eerii deleted the clippy_net branch March 10, 2024 17:03
@@ -224,7 +218,7 @@ impl ImageBytes {
ImageBytes::InProgress(ref mut bytes) => bytes,
ImageBytes::Complete(_) => panic!("attempted modification of complete image bytes"),
};
mem::replace(own_bytes, vec![])
std::mem::take(own_bytes)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either mem::take or stop importing std::mem, but this is causing a compile warning (#31607).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that, I'll fix it right away.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed with #31608

@eerii eerii mentioned this pull request Mar 10, 2024
4 tasks
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

4 participants