[ needless_for_each ]: fix doc nits
This commit is contained in:
parent
5e60afb6cc
commit
7ab4af336c
@ -25,14 +25,14 @@
|
||||
/// ```no_run
|
||||
/// let v = vec![0, 1, 2];
|
||||
/// v.iter().for_each(|elem| {
|
||||
/// println!("{}", elem);
|
||||
/// println!("{elem}");
|
||||
/// })
|
||||
/// ```
|
||||
/// Use instead:
|
||||
/// ```no_run
|
||||
/// let v = vec![0, 1, 2];
|
||||
/// for elem in v.iter() {
|
||||
/// println!("{}", elem);
|
||||
/// for elem in &v {
|
||||
/// println!("{elem}");
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user