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/script/dom/request.rs #31867

Merged
merged 1 commit into from Mar 27, 2024

Conversation

Aaryakhandelwal
Copy link
Contributor

@Aaryakhandelwal Aaryakhandelwal commented Mar 26, 2024

Major changes are:

  1. changed the implementation of Into<_> to From statement as the former is included in the latter by default.
  2. Dereferenced wherever necessary.

  • There are tests for these changes OR
  • These changes do not require tests because they only fix clippy warnings.

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.

Looks great! I only have one nit request for these changes. Let's avoid abbreviating in this case since "value" is only two characters longer and increases clarity.

Comment on lines 669 to 671
impl From<RequestCache> for NetTraitsRequestCache {
fn from(val: RequestCache) -> Self {
match val {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
impl From<RequestCache> for NetTraitsRequestCache {
fn from(val: RequestCache) -> Self {
match val {
impl From<RequestCache> for NetTraitsRequestCache {
fn from(value: RequestCache) -> Self {
match value {

Copy link
Member

Choose a reason for hiding this comment

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

I've gone ahead and made these changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apologies, I was preoccupied with some personal work and couldn't attend to the changes requested.
Thank you for making the commit.

Copy link
Member

Choose a reason for hiding this comment

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

No worries. Thank you for the contribution!

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.

Apologies. I didn't set the proper review flag before.

@mrobinson mrobinson added this pull request to the merge queue Mar 27, 2024
Merged via the queue into servo:main with commit 1f31609 Mar 27, 2024
9 checks passed
ektuu pushed a commit to ektuu/servo that referenced this pull request Mar 28, 2024
MunishMummadi pushed a commit to MunishMummadi/servo that referenced this pull request Mar 29, 2024
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