Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

cargo fix --clippy isn't as smart as I want it to be :( #182

Closed
@jyn514

Description

@jyn514

This gives a warning instead of replacing it with the suggested code:

$ cargo +nightly fix -Z unstable-options --clippy
warning: using `clone` on a `Copy` type
   --> src/parse/mod.rs:258:27
    |
258 |                 location: self.next_location().clone(),
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.next_location()`

It would be really nice to have this be done automatically, since I currently have about 20 of these warnings in my code.

$ cargo +nightly --version
cargo 1.40.0-nightly (5da4b4d47 2019-10-28)
$ ~/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/rustfmt --version
rustfmt 1.4.9-nightly (33e36670 2019-10-07)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions