From 455f56bced161605f324966c0b251a8de3cfdb9a Mon Sep 17 00:00:00 2001 From: Vlad Frolov Date: Sat, 30 Sep 2023 09:04:34 +0200 Subject: [PATCH] refactor: Fixed linting warnings --- crate/src/lib.rs | 6 +++--- crate/src/sync.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crate/src/lib.rs b/crate/src/lib.rs index 0ad8b04..80974a7 100644 --- a/crate/src/lib.rs +++ b/crate/src/lib.rs @@ -99,13 +99,13 @@ pub fn install() -> anyhow::Result { install_with_version(DEFAULT_NEAR_SANDBOX_VERSION) } -fn installable(bin_path: &PathBuf) -> anyhow::Result> { +fn installable(bin_path: &Path) -> anyhow::Result> { // Sandbox bin already exists if bin_path.exists() { return Ok(None); } - let mut lockpath = bin_path.clone(); + let mut lockpath = bin_path.to_path_buf(); lockpath.set_extension("lock"); // Acquire the lockfile @@ -192,7 +192,7 @@ pub fn init_with_version(home_dir: impl AsRef, version: &str) -> anyhow::R let home_dir = home_dir.as_ref().to_str().unwrap(); Command::new(&bin_path) .envs(log_vars()) - .args(&["--home", home_dir, "init", "--fast"]) + .args(["--home", home_dir, "init", "--fast"]) .spawn() .with_context(|| format!("failed to init sandbox using '{}'", bin_path.display())) } diff --git a/crate/src/sync.rs b/crate/src/sync.rs index 970dff9..72386f5 100644 --- a/crate/src/sync.rs +++ b/crate/src/sync.rs @@ -28,7 +28,7 @@ pub fn init(home_dir: impl AsRef) -> anyhow::Result { let home_dir = home_dir.as_ref().to_str().unwrap(); Command::new(bin_path) .envs(crate::log_vars()) - .args(&["--home", home_dir, "init"]) + .args(["--home", home_dir, "init"]) .spawn() .map_err(Into::into) }