Clippy + fmt

i18n
Michal 2 years ago committed by GitHub
parent e93bc7931c
commit 385329047e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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::<Vec<String>>()[1] == "-Sa";

@ -92,7 +92,7 @@ pub fn repo_search(query: &str, options: Options) -> String {
let mut results_vec: Vec<SearchResult> = vec![];
let clone = lines.clone().collect::<Vec<&str>>();
if clone.len() == 1 && clone[0] == "" {
if clone.len() == 1 && clone[0].is_empty() {
// If no results, return empty string
return "".to_string();
}

Loading…
Cancel
Save