Skip to content

Fix as many clippy problems as possible #31500

@mrobinson

Description

@mrobinson

Steps:

  1. Get Servo building and running locally following project documentation at http://github.com/servo/servo.
  2. Run ./mach cargo-clippy
  3. Fix an issue by understanding what the error means and correcting the issue. For instance
warning: redundant field names in struct initialization
   --> components/remutex/lib.rs:168:13
    |
168 |             data: data,
    |             ^^^^^^^^^^ help: replace it with: `data`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
    = note: `#[warn(clippy::redundant_field_names)]` on by default
In this case `data: data` can just be replaced with `data`.
  1. Open an pull request with your fix, filling out the template, and giving it a full name like the following "clippy: Fix a redundant field warning in components/remutex/lib.rs.
  2. Include a link to this issue in your pull request description body.

As this issue is large enough to be worked on in parallel, please don't ask to assign it to yourself. If you want to post fixes for a particular section of code, just check the PRs linked here to make sure that you are fixing different issues.

NOTE: The warnings for missing safety documentation for unsafe code is already handled in PR #33748. Please ignore those.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-less-complexStraightforward. Recommended for a new contributor.good first issueNewcomer-friendly issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions