Satisfy clippy.

This commit is contained in:
Stephen Chung
2021-07-26 22:22:27 +08:00
parent 2c50738c6c
commit 29133cf973
9 changed files with 75 additions and 63 deletions

View File

@@ -1281,22 +1281,22 @@ fn scan_block_comment(
match c {
'/' => {
stream.peek_next().filter(|&c2| c2 == '*').map(|c2| {
if let Some(c2) = stream.peek_next().filter(|&c2| c2 == '*') {
eat_next(stream, pos);
if let Some(comment) = comment.as_mut() {
comment.push(c2);
}
level += 1;
});
}
}
'*' => {
stream.peek_next().filter(|&c2| c2 == '/').map(|c2| {
if let Some(c2) = stream.peek_next().filter(|&c2| c2 == '/') {
eat_next(stream, pos);
if let Some(comment) = comment.as_mut() {
comment.push(c2);
}
level -= 1;
});
}
}
'\n' => pos.new_line(),
_ => (),