Skip to content

Improve documentation of needless_range_loop #6929

@flip1995

Description

@flip1995

I still believe this lint has grown too large, if we look at the doc page, it says "Checks for looping over the range of 0..len of some collection just to get the values by index", so at least the documentation should be updated to discuss any a..b range.

Originally posted by @ChrisJefferson in #6075 (comment)

We should improve the documentation of the needless_range_loop lint to better explain what cases this lint triggers on. Also make more clear, that using iterators usually has better performance (re-classify?).

Metadata

Metadata

Assignees

Labels

A-documentationArea: Adding or improving documentationgood 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