diff --git a/src/main.rs b/src/main.rs index e987556..946afee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,8 +6,8 @@ use clap::Parser; use clap_complete::{Generator, Shell}; use internal::commands::ShellCommand; use internal::error::SilentUnwrap; -use std::fs; use std::env; +use std::fs; use std::path::Path; use std::str::FromStr; @@ -102,10 +102,7 @@ fn cmd_install(args: InstallArgs, options: Options, cachedir: &str) { let packages = args.packages; if args.aur && args.repo { - crash!( - AppExitCode::Other, - "Cannot specify both --aur and --repo" - ); + crash!(AppExitCode::Other, "Cannot specify both --aur and --repo"); } let aur = args.aur || env::args().collect::>()[1] == "-Sa"; diff --git a/src/operations/search.rs b/src/operations/search.rs index d8f2ffd..d1f9dee 100644 --- a/src/operations/search.rs +++ b/src/operations/search.rs @@ -92,7 +92,7 @@ pub fn repo_search(query: &str, options: Options) -> String { let mut results_vec: Vec = vec![]; let clone = lines.clone().collect::>(); - if clone.len() == 1 && clone[0] == "" { + if clone.len() == 1 && clone[0].is_empty() { // If no results, return empty string return "".to_string(); }