Skip to content

Commit

Permalink
address nits
Browse files Browse the repository at this point in the history
  • Loading branch information
cole-k committed Jan 10, 2023
1 parent 2b563c9 commit ade1a47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flux-bin/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub fn get_ld_library_path(rust_toolchain: &str) -> Result<PathBuf> {

pub fn get_rustup_home() -> Result<PathBuf> {
env::var("RUSTUP_HOME")
.map(|home_dir| PathBuf::from(&home_dir))
.map(PathBuf::from)
.or_else(|e| {
match e {
env::VarError::NotPresent => {
Expand All @@ -84,7 +84,7 @@ pub fn get_rustup_home() -> Result<PathBuf> {
/// Prepends the path so that it's the first checked.
pub fn extend_env_var_with_path(var_name: &str, new_path: PathBuf) -> Result<OsString> {
let mut paths = env::var(var_name)
.map(|paths_str| env::split_paths(&paths_str).collect::<Vec<_>>())
.map(|paths_str| env::split_paths(&paths_str).collect())
.or_else(|err| {
match err {
env::VarError::NotPresent => Ok(Vec::new()),
Expand Down

0 comments on commit ade1a47

Please sign in to comment.