Skip to content

Commit

Permalink
feat unwrap_or warning (use-ink#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
honeywest authored Jan 11, 2021
1 parent ae7b612 commit 87ef094
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ where
S: AsRef<OsStr>,
P: AsRef<Path>,
{
let cargo = std::env::var("CARGO").unwrap_or("cargo".to_string());
let cargo = std::env::var("CARGO").unwrap_or_else(|_| "cargo".to_string());
let mut cmd = Command::new(cargo);
if let Some(path) = working_dir {
log::debug!("Setting cargo working dir to '{}'", path.as_ref().display());
Expand Down

0 comments on commit 87ef094

Please sign in to comment.