]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/doc.rs
Improvements to `while_let_on_iterator`
[rust.git] / clippy_lints / src / doc.rs
index fb53b55ebd6acdd41e0d2a9f94676248bccf4343..e67ec4e06c547d3455f6cd83507ddd227d503a3e 100644 (file)
@@ -383,7 +383,7 @@ pub fn strip_doc_comment_decoration(doc: &str, comment_kind: CommentKind, span:
     let mut no_stars = String::with_capacity(doc.len());
     for line in doc.lines() {
         let mut chars = line.chars();
-        while let Some(c) = chars.next() {
+        for c in &mut chars {
             if c.is_whitespace() {
                 no_stars.push(c);
             } else {