Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Commit

Permalink
refactor: use Rust 1.58 format strings
Browse files Browse the repository at this point in the history
  • Loading branch information
tranzystorekk committed Jan 13, 2022
1 parent f2b98b8 commit 3789421
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl CommandMaker {
pub fn as_string(&self) -> String {
match self {
CommandMaker::Regular(cmd) => cmd.clone(),
CommandMaker::Root(cmd) => format!("{} {}", SUDO_CMD, cmd),
CommandMaker::Root(cmd) => format!("{SUDO_CMD} {cmd}"),
}
}

Expand All @@ -70,9 +70,9 @@ impl CommandMaker {

match self {
Self::Root(command) | Self::Regular(command) => {
let verify_command = format!("command -v {}", command);
let verify_command = format!("command -v {command}");

debug!("Executing command: `sh -c {}`", verify_command);
debug!("Executing command: `sh -c {verify_command}");

cmd.arg(verify_command);
}
Expand Down Expand Up @@ -101,7 +101,7 @@ impl PacmanWrapper {
cmd.arg(INSTALL_FLAG);

if as_deps {
deps_flag_format = format!(" {}", AS_DEPS_FLAG);
deps_flag_format = format!(" {AS_DEPS_FLAG}");
cmd.arg(AS_DEPS_FLAG);
}

Expand Down Expand Up @@ -181,7 +181,7 @@ impl PacmanWrapper {
pub fn remove_orphans(&self) -> IoResult<ExitStatus> {
let packages = self.get_orphans()?;

debug!("Orphans: {:?}", packages);
debug!("Orphans: {packages:?}");

if packages.is_empty() {
info!("No orphans to remove");
Expand Down

0 comments on commit 3789421

Please sign in to comment.