Skip to content

new lint: using let mut a = a at start of function #5102

Closed
@jyn514

Description

@jyn514

I inherited a codebase from someone new to Rust and there were lots of function definitions that looked like this:

fn f(a: Vec<u8>) {
    let mut a = a;
    // rest of code
}

It would be nice if there were a lint saying this would be better as fn f(mut a: Vec<u8>) instead.

Metadata

Metadata

Assignees

Labels

A-lintArea: New lintsL-complexityLint: Belongs in the complexity lint groupL-suggestionLint: Improving, adding or fixing lint suggestionsgood 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