amethyst: make clippy the paperclip happy

i18n
Fries 2 years ago
parent b0c1bd3a7b
commit 51f5d28d50

@ -39,7 +39,7 @@ impl PaccacheBuilder {
}
command
.args(&["-r", &format!("-k{}", self.keep)])
.args(["-r", &format!("-k{}", self.keep)])
.wait_success()
.await
}

@ -10,7 +10,7 @@ impl PacdiffBuilder {
#[tracing::instrument(level = "trace")]
pub async fn list() -> AppResult<StringOutput> {
let result = ShellCommand::pacdiff()
.args(&["-o", "-f"])
.args(["-o", "-f"])
.elevated()
.wait_with_output()
.await?;

@ -77,6 +77,6 @@ impl Config {
lazy_static! {
static ref CONFIG: Config = Config::read();
}
&*CONFIG
&CONFIG
}
}

@ -53,5 +53,5 @@ pub fn uwu_enabled() -> bool {
/// Checks if we're running in a tty. If we do we can assume that
/// the output can safely be colorized.
pub fn is_tty() -> bool {
(unsafe { libc::isatty(libc::STDIN_FILENO as i32) } != 0)
(unsafe { libc::isatty(libc::STDIN_FILENO) } != 0)
}

@ -54,7 +54,7 @@ pub fn get_config_dir() -> &'static Path {
static ref CONFIG_DIR: &'static Path = create_if_not_exist(get_directories().config_dir());
}
*CONFIG_DIR
&CONFIG_DIR
}
pub fn get_cache_dir() -> &'static Path {
@ -62,7 +62,7 @@ pub fn get_cache_dir() -> &'static Path {
static ref CACHE_DIR: &'static Path = create_if_not_exist(get_directories().cache_dir());
}
*CACHE_DIR
&CACHE_DIR
}
fn get_directories() -> &'static ProjectDirs {
@ -70,7 +70,7 @@ fn get_directories() -> &'static ProjectDirs {
static ref DIRECTORIES: ProjectDirs = ProjectDirs::from("com", "crystal", "ame").unwrap();
}
&*DIRECTORIES
&DIRECTORIES
}
fn create_if_not_exist(dir: &Path) -> &Path {

@ -175,7 +175,7 @@ async fn cmd_search(args: InstallArgs, options: Options) {
get_logger().print_list(&list, "\n", 0);
if list.join("\n").lines().count() > crossterm::terminal::size().unwrap().1 as usize {
page_string(&list.join("\n")).silent_unwrap(AppExitCode::Other);
page_string(list.join("\n")).silent_unwrap(AppExitCode::Other);
}
}
}

@ -48,7 +48,7 @@ pub async fn download_aur_source(mut ctx: BuildContext) -> AppResult<BuildContex
);
let cache_dir = get_cache_dir();
let pkg_dir = cache_dir.join(&pkg_name);
let pkg_dir = cache_dir.join(pkg_name);
if pkg_dir.exists() {
pb.set_message(format!(
@ -146,7 +146,7 @@ pub fn create_dependency_batches(deps: Vec<&PackageInfo>) -> Vec<Vec<&PackageInf
relaxed = true;
} else {
tracing::debug!("Created batch {current_batch:?}");
batches.push(current_batch.into_iter().map(|(_, v)| v).collect());
batches.push(current_batch.into_values().collect());
relaxed = false;
}
}

Loading…
Cancel
Save