From 65b74277d1f113174ad52cae9ffa93fbef1dc705 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Tue, 21 Apr 2026 02:34:35 +0100 Subject: chore: update to rust 1.95 (#3426) ## Checks - [ ] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle - [ ] I have checked that there are no existing pull requests for the same thing --- crates/atuin-history/src/stats.rs | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'crates/atuin-history/src') diff --git a/crates/atuin-history/src/stats.rs b/crates/atuin-history/src/stats.rs index 8bf03e42..fedb1487 100644 --- a/crates/atuin-history/src/stats.rs +++ b/crates/atuin-history/src/stats.rs @@ -79,25 +79,19 @@ fn split_at_pipe(command: &str) -> Vec<&str> { while let Some((i, c)) = graphemes.next() { let current = i; match c { - "\"" => { - if command[start..current] != *"\"" { - quoted = !quoted; - } + "\"" if command[start..current] != *"\"" => { + quoted = !quoted; } - "'" => { - if command[start..current] != *"'" { - quoted = !quoted; - } + "'" if command[start..current] != *"'" => { + quoted = !quoted; } - "\\" => if graphemes.next().is_some() {}, - "|" => { - if !quoted { - if current > start && command[start..].starts_with('|') { - start += 1; - } - result.push(&command[start..current]); - start = current; + "\\" if graphemes.next().is_some() => {} + "|" if !quoted => { + if current > start && command[start..].starts_with('|') { + start += 1; } + result.push(&command[start..current]); + start = current; } _ => {} } -- cgit v1.3.1