From 5af3cd2670c2312ce6821a149ed70ebd1bdf5d01 Mon Sep 17 00:00:00 2001 From: Ray Kohler Date: Mon, 11 Aug 2025 16:30:31 -0400 Subject: fix: clean up new rustc and clippy warnings on Rust 1.89 --- crates/atuin-client/src/import/xonsh.rs | 5 ++--- crates/atuin-client/src/import/zsh.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'crates/atuin-client/src/import') diff --git a/crates/atuin-client/src/import/xonsh.rs b/crates/atuin-client/src/import/xonsh.rs index 201cad15..a9e6449d 100644 --- a/crates/atuin-client/src/import/xonsh.rs +++ b/crates/atuin-client/src/import/xonsh.rs @@ -66,11 +66,10 @@ fn load_sessions(hist_dir: &Path) -> Result> { for entry in fs::read_dir(hist_dir)? { let p = entry?.path(); let ext = p.extension().and_then(|e| e.to_str()); - if p.is_file() && ext == Some("json") { - if let Some(data) = load_session(&p)? { + if p.is_file() && ext == Some("json") + && let Some(data) = load_session(&p)? { sessions.push(data); } - } } Ok(sessions) } diff --git a/crates/atuin-client/src/import/zsh.rs b/crates/atuin-client/src/import/zsh.rs index 694a9aa8..b65e2608 100644 --- a/crates/atuin-client/src/import/zsh.rs +++ b/crates/atuin-client/src/import/zsh.rs @@ -118,7 +118,7 @@ fn parse_extended(line: &str, counter: i64) -> History { imported.build().into() } -fn unmetafy(line: &[u8]) -> Option> { +fn unmetafy(line: &[u8]) -> Option> { if line.contains(&0x83) { let mut s = Vec::with_capacity(line.len()); let mut is_meta = false; -- cgit v1.3.1