Skip to content

Lint to suggest clone_from and clone_into #1709

Closed
@clarfonthey

Description

@clarfonthey

Basically, we'd suggest the following replacements:

a = b.clone() => a.clone_from(&b)
a = b.to_owned() => b.clone_into(&mut a)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsL-perfLint: Belongs in the perf lint groupT-middleType: Probably requires verifiying typesgood first issueThese issues are a good way to get started with Clippy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions