diff options
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/atuin-common/src/lib.rs | 2 | ||||
| -rw-r--r-- | crates/atuin/src/command/client/doctor.rs | 3 | ||||
| -rw-r--r-- | crates/atuin/src/command/client/search/inspector.rs | 4 |
3 files changed, 5 insertions, 4 deletions
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<sqlx::encode::IsNull, Box<(dyn std::error::Error + Send + Sync + 'static)>> + ) -> Result<sqlx::encode::IsNull, Box<dyn std::error::Error + Send + Sync + 'static>> { 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() |
