diff --git a/src/steps/os/archlinux.rs b/src/steps/os/archlinux.rs index 74290377..892a8994 100644 --- a/src/steps/os/archlinux.rs +++ b/src/steps/os/archlinux.rs @@ -245,7 +245,7 @@ impl Aura { impl ArchPackageManager for Aura { fn upgrade(&self, ctx: &ExecutionContext) -> Result<()> { - let sudo = which("sudo").unwrap_or(PathBuf::new()); + let sudo = which("sudo").unwrap_or_else(PathBuf::new); let mut aur_update = ctx.run_type().execute(&sudo); if sudo.ends_with("sudo") { diff --git a/src/steps/tmux.rs b/src/steps/tmux.rs index 436865f9..388b65b4 100644 --- a/src/steps/tmux.rs +++ b/src/steps/tmux.rs @@ -84,7 +84,7 @@ pub fn run_in_tmux(args: Vec) -> ! { shell_words::join(command) }; - let tmux = Tmux::new(args.clone()); + let tmux = Tmux::new(args); if !tmux.has_session("topgrade").expect("Error detecting a tmux session") { tmux.new_session("topgrade").expect("Error creating a tmux session");