X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=clippy_lints%2Fsrc%2Fdoc.rs;h=e67ec4e06c547d3455f6cd83507ddd227d503a3e;hb=daca50a515f28218142d9945ca714f7420b4fc75;hp=fb53b55ebd6acdd41e0d2a9f94676248bccf4343;hpb=f6d1f368db9e726fde825dc2525cdec07673b416;p=rust.git diff --git a/clippy_lints/src/doc.rs b/clippy_lints/src/doc.rs index fb53b55ebd6..e67ec4e06c5 100644 --- a/clippy_lints/src/doc.rs +++ b/clippy_lints/src/doc.rs @@ -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 {