Add example to needless_range_loop
This commit is contained in:
parent
647cc4026f
commit
bd8f289247
@ -66,6 +66,12 @@ declare_clippy_lint! {
|
||||
/// println!("{}", vec[i]);
|
||||
/// }
|
||||
/// ```
|
||||
/// Could be written as:
|
||||
/// ```ignore
|
||||
/// for i in vec {
|
||||
/// println!("{}", i);
|
||||
/// }
|
||||
/// ```
|
||||
pub NEEDLESS_RANGE_LOOP,
|
||||
style,
|
||||
"for-looping over a range of indices where an iterator over items would do"
|
||||
|
Loading…
x
Reference in New Issue
Block a user