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

Remove redundant field names in struct init #526

Merged
merged 1 commit into from Jul 23, 2019

Conversation

dekellum
Copy link
Contributor

@dekellum dekellum commented Jul 22, 2019

Besides the obvious minimization, these changes avoid lints of the following form from clippy:

    warning: redundant field names in struct initialization
      --> src/form_urlencoded.rs:30:13
       |
    30 |     Parse { input: input }
       |             ^^^^^^^^^^^^ help: replace it with: `input`
       |
       = help: for further information visit
    https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names

This change is Reviewable

Besides the obvious minimization, these changes avoid lints of the
following form from clippy:

    warning: redundant field names in struct initialization
      --> src/form_urlencoded.rs:30:13
       |
    30 |     Parse { input: input }
       |             ^^^^^^^^^^^^ help: replace it with: `input`
       |
       = help: for further information visit
    https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
@SimonSapin
Copy link
Member

This code probably dates from before this syntax existed in the language :)

I generally don’t use Clippy and being "clippy-clean" is not at all a goal, but this particular change looks good to me. Thanks.

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit cce2d32 has been approved by SimonSapin

@bors-servo
Copy link
Contributor

⌛ Testing commit cce2d32 with merge 255aaa9...

bors-servo pushed a commit that referenced this pull request Jul 23, 2019
…Sapin

Remove redundant field names in struct init

Besides the obvious minimization, these changes avoid lints of the following form from clippy:

``` txt
    warning: redundant field names in struct initialization
      --> src/form_urlencoded.rs:30:13
       |
    30 |     Parse { input: input }
       |             ^^^^^^^^^^^^ help: replace it with: `input`
       |
       = help: for further information visit
    https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
```

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/526)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - checks-travis
Approved by: SimonSapin
Pushing 255aaa9 to master...

@bors-servo bors-servo merged commit cce2d32 into servo:master Jul 23, 2019
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

3 participants