From efec43b3b8827820cf35fe1b73d8e33f5fe84eb4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 20 Jun 2026 01:16:50 +0900 Subject: refactor: auto-fix clippy warnings --- crates/shirabe/src/command/search_command.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'crates/shirabe/src/command/search_command.rs') diff --git a/crates/shirabe/src/command/search_command.rs b/crates/shirabe/src/command/search_command.rs index a3254e4..19a215f 100644 --- a/crates/shirabe/src/command/search_command.rs +++ b/crates/shirabe/src/command/search_command.rs @@ -33,6 +33,12 @@ pub struct SearchCommand { base_command_data: BaseCommandData, } +impl Default for SearchCommand { + fn default() -> Self { + Self::new() + } +} + impl SearchCommand { pub fn new() -> Self { let mut command = SearchCommand { @@ -217,7 +223,7 @@ impl Command for SearchCommand { let results = repos.search(query, mode, r#type)?; - if results.len() > 0 && format == "text" { + if !results.is_empty() && format == "text" { let width = self.get_terminal_width(); let mut name_length: i64 = 0; for result in &results { -- cgit v1.3.1