From 16953409fd10f187cf5b771aeda32b46bf396abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sch=C3=B6nauer?= <37108907+DottoDev@users.noreply.github.com> Date: Thu, 3 Nov 2022 19:34:27 +0000 Subject: [PATCH] Get windows to finish clippy without errors (#133) * Changes windows get_wsl_distribution argument * changes in get_wsl_distributions * changes in run_wsl_topgrade due to clippy errors --- src/steps/os/windows.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/steps/os/windows.rs b/src/steps/os/windows.rs index 02d4c55f..c380e3cb 100644 --- a/src/steps/os/windows.rs +++ b/src/steps/os/windows.rs @@ -65,8 +65,8 @@ pub fn run_scoop(cleanup: bool, run_type: RunType) -> Result<()> { Ok(()) } -fn get_wsl_distributions(wsl: Path) -> Result> { - let output = Command::new(wsl).args(["--list", "-q"]).check_output()?; +fn get_wsl_distributions(wsl: &Path) -> Result> { + let output = Command::new(&wsl).args(["--list", "-q"]).check_output()?; Ok(output .lines() .filter(|s| !s.is_empty()) @@ -94,7 +94,7 @@ fn upgrade_wsl_distribution(wsl: &Path, dist: &str, ctx: &ExecutionContext) -> R pub fn run_wsl_topgrade(ctx: &ExecutionContext) -> Result<()> { let wsl = require("wsl")?; - let wsl_distributions = get_wsl_distributions(wsl)?; + let wsl_distributions = get_wsl_distributions(&wsl)?; let mut ran = false; debug!("WSL distributions: {:?}", wsl_distributions);