Shut up clippy.

This commit is contained in:
Stephen Chung
2022-08-27 16:26:41 +08:00
parent d80184ba14
commit bf5d6ab35a
28 changed files with 313 additions and 205 deletions

View File

@@ -2315,13 +2315,13 @@ impl InputStream for MultiInputsStream<'_> {
if self.index >= self.streams.len() {
// No more streams
return None;
} else if let Some(ch) = self.streams[self.index].next() {
}
if let Some(ch) = self.streams[self.index].next() {
// Next character in current stream
return Some(ch);
} else {
// Jump to the next stream
self.index += 1;
}
// Jump to the next stream
self.index += 1;
}
}
fn peek_next(&mut self) -> Option<char> {
@@ -2333,13 +2333,13 @@ impl InputStream for MultiInputsStream<'_> {
if self.index >= self.streams.len() {
// No more streams
return None;
} else if let Some(&ch) = self.streams[self.index].peek() {
}
if let Some(&ch) = self.streams[self.index].peek() {
// Next character in current stream
return Some(ch);
} else {
// Jump to the next stream
self.index += 1;
}
// Jump to the next stream
self.index += 1;
}
}
}