mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 02:31:18 -03:00
clippy: fix nightly while_let_loop lint
https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop Closes #12391
This commit is contained in:
committed by
Johannes Altmanninger
parent
ad82c7ebf1
commit
40c480c2cf
@@ -290,12 +290,7 @@ pub fn offset_of_next_item_fish_2_0(
|
||||
// Walk over lines that we think are interior. These lines are not null terminated, but
|
||||
// are guaranteed to contain a newline.
|
||||
let mut timestamp = None;
|
||||
loop {
|
||||
let Some(interior_line) = lines.next_if(|l| l.starts_with(b" ")) else {
|
||||
// If the first character is not a space, it's not an interior line, so we're done.
|
||||
break;
|
||||
};
|
||||
|
||||
while let Some(interior_line) = lines.next_if(|l| l.starts_with(b" ")) {
|
||||
// Try parsing a timestamp from this line. If we succeed, the loop will break.
|
||||
timestamp = parse_timestamp(interior_line);
|
||||
if timestamp.is_some() {
|
||||
|
||||
Reference in New Issue
Block a user