Skip to content

Commit

Permalink
refactor: Fixed linting warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
frol committed Sep 30, 2023
1 parent 120f784 commit 455f56b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ pub fn install() -> anyhow::Result<PathBuf> {
install_with_version(DEFAULT_NEAR_SANDBOX_VERSION)
}

fn installable(bin_path: &PathBuf) -> anyhow::Result<Option<std::fs::File>> {
fn installable(bin_path: &Path) -> anyhow::Result<Option<std::fs::File>> {
// 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
Expand Down Expand Up @@ -192,7 +192,7 @@ pub fn init_with_version(home_dir: impl AsRef<Path>, 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()))
}
Expand Down
2 changes: 1 addition & 1 deletion crate/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub fn init(home_dir: impl AsRef<Path>) -> anyhow::Result<Child> {
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)
}

0 comments on commit 455f56b

Please sign in to comment.