diff options
| author | Ellie Huxtable <ellie@elliehuxtable.com> | 2026-01-26 11:51:14 -0800 |
|---|---|---|
| committer | Ellie Huxtable <ellie@elliehuxtable.com> | 2026-01-26 11:54:25 -0800 |
| commit | c252a55d65d82759070ba048cfa58ebf626c1c75 (patch) | |
| tree | ab1b7474595f3bd8e551c45fa7057136b2788e61 | |
| parent | chore: update to rust 1.93 (diff) | |
| download | atuin-c252a55d65d82759070ba048cfa58ebf626c1c75.zip | |
clippy clappy
| -rw-r--r-- | crates/atuin/src/command/client/search.rs | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/crates/atuin/src/command/client/search.rs b/crates/atuin/src/command/client/search.rs index be00ee99..ceeb9436 100644 --- a/crates/atuin/src/command/client/search.rs +++ b/crates/atuin/src/command/client/search.rs @@ -150,20 +150,17 @@ impl Cmd { store: SqliteStore, theme: &Theme, ) -> Result<()> { - let query = self.query.map_or_else( - || { - std::env::var("ATUIN_QUERY").map_or_else( - |_| vec![], - |query| { - query - .split(' ') - .map(std::string::ToString::to_string) - .collect() - }, - ) - }, - |query| query, - ); + let query = self.query.unwrap_or_else(|| { + std::env::var("ATUIN_QUERY").map_or_else( + |_| vec![], + |query| { + query + .split(' ') + .map(std::string::ToString::to_string) + .collect() + }, + ) + }); if (self.delete_it_all || self.delete) && self.limit.is_some() { // Because of how deletion is implemented, it will always delete all matches |
