From 40c480c2cf3c251031f3f27e857368abf72f399b Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Fri, 30 Jan 2026 07:09:43 +0000 Subject: [PATCH] clippy: fix nightly while_let_loop lint https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop Closes #12391 --- src/history/yaml_backend.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/history/yaml_backend.rs b/src/history/yaml_backend.rs index 6b4bfad3a..849c0730c 100644 --- a/src/history/yaml_backend.rs +++ b/src/history/yaml_backend.rs @@ -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() {