Resolve clippy errors (#130)

* Resolves clippy errors

* Fixes clippy errors
This commit is contained in:
Thomas Schönauer
2022-11-03 18:54:40 +00:00
committed by GitHub
parent 4dcb5a214b
commit 66e0b94e85
2 changed files with 17 additions and 17 deletions

View File

@@ -46,8 +46,8 @@ impl Powershell {
#[cfg(windows)]
pub fn has_module(powershell: &Path, command: &str) -> bool {
Command::new(&powershell)
.args(&[
Command::new(powershell)
.args([
"-NoProfile",
"-Command",
&format!("Get-Module -ListAvailable {}", command),
@@ -100,14 +100,14 @@ impl Powershell {
let mut command = if let Some(sudo) = ctx.sudo() {
let mut command = ctx.run_type().execute(sudo);
command.arg(&powershell);
command.arg(powershell);
command
} else {
ctx.run_type().execute(&powershell)
ctx.run_type().execute(powershell)
};
command
.args(&[
.args([
"-NoProfile",
"-Command",
&format!(