Auto merge of #9017 - alex-semenyuk:while_let_on_iterator_doc_fix, r=giraffate
Example for `WHILE_LET_ON_ITERATOR` changelog: none example for `WHILE_LET_ON_ITERATOR`, using `for` instead of `while let`
This commit is contained in:
commit
bc0bf06718
@ -346,7 +346,14 @@ declare_clippy_lint! {
|
|||||||
///
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
/// ```ignore
|
/// ```ignore
|
||||||
/// while let Some(val) = iter() {
|
/// while let Some(val) = iter.next() {
|
||||||
|
/// ..
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// Use instead:
|
||||||
|
/// ```ignore
|
||||||
|
/// for val in &mut iter {
|
||||||
/// ..
|
/// ..
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user