mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-11 22:02:55 +00:00
[ needless_for_each ]: fix doc nits
This commit is contained in:
parent
5e60afb6cc
commit
7ab4af336c
1 changed files with 3 additions and 3 deletions
|
@ -25,14 +25,14 @@ declare_clippy_lint! {
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// let v = vec![0, 1, 2];
|
/// let v = vec![0, 1, 2];
|
||||||
/// v.iter().for_each(|elem| {
|
/// v.iter().for_each(|elem| {
|
||||||
/// println!("{}", elem);
|
/// println!("{elem}");
|
||||||
/// })
|
/// })
|
||||||
/// ```
|
/// ```
|
||||||
/// Use instead:
|
/// Use instead:
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// let v = vec![0, 1, 2];
|
/// let v = vec![0, 1, 2];
|
||||||
/// for elem in v.iter() {
|
/// for elem in &v {
|
||||||
/// println!("{}", elem);
|
/// println!("{elem}");
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in a new issue