Skip to content

Lint calling methods that are redundant to deref #2094

Description

@clarfonthey

For example, vec.as_slice().first() could be just worded as vec.first().

We'd probably want to have a whitelist for this, but in general, calling such methods is redundant.

Metadata

Metadata

Assignees

Labels

A-lintArea: New lintsL-unnecessaryLint: Warn about unnecessary codeT-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