From 65b25c4f824217c52a21c408bf64bf56003c1b08 Mon Sep 17 00:00:00 2001 From: Ray Kohler Date: Fri, 26 Sep 2025 13:46:49 -0400 Subject: chore: update to Rust 1.90 (#2916) ## Checks - [X] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle - [X] I have checked that there are no existing pull requests for the same thing Hopefully this one is mergeable as is, unlike the 1.89 upgrade. Fixes: #2915 --- crates/atuin-common/src/lib.rs | 2 +- crates/atuin/src/command/client/doctor.rs | 3 ++- crates/atuin/src/command/client/search/inspector.rs | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'crates') diff --git a/crates/atuin-common/src/lib.rs b/crates/atuin-common/src/lib.rs index a776f09a..75bfc3e9 100644 --- a/crates/atuin-common/src/lib.rs +++ b/crates/atuin-common/src/lib.rs @@ -45,7 +45,7 @@ macro_rules! new_uuid { fn encode_by_ref( &self, buf: &mut DB::ArgumentBuffer<'q>, - ) -> Result> + ) -> Result> { self.0.encode_by_ref(buf) } diff --git a/crates/atuin/src/command/client/doctor.rs b/crates/atuin/src/command/client/doctor.rs index 07606b31..83d9e84c 100644 --- a/crates/atuin/src/command/client/doctor.rs +++ b/crates/atuin/src/command/client/doctor.rs @@ -251,7 +251,8 @@ impl SyncInfo { cloud: settings.sync_address == "https://api.atuin.sh", auto_sync: settings.auto_sync, records: settings.sync.records, - last_sync: Settings::last_sync().map_or("no last sync".to_string(), |v| v.to_string()), + last_sync: Settings::last_sync() + .map_or_else(|_| "no last sync".to_string(), |v| v.to_string()), } } } diff --git a/crates/atuin/src/command/client/search/inspector.rs b/crates/atuin/src/command/client/search/inspector.rs index 079eab28..a39e63a8 100644 --- a/crates/atuin/src/command/client/search/inspector.rs +++ b/crates/atuin/src/command/client/search/inspector.rs @@ -52,7 +52,7 @@ pub fn draw_commands( stats .previous .clone() - .map_or("No previous command".to_string(), |prev| prev.command), + .map_or_else(|| "No previous command".to_string(), |prev| prev.command), ) .block( Block::new() @@ -66,7 +66,7 @@ pub fn draw_commands( stats .next .clone() - .map_or("No next command".to_string(), |next| next.command), + .map_or_else(|| "No next command".to_string(), |next| next.command), ) .block( Block::new() -- cgit v1.3.1