fn augment_search(paths: &[PathBuf], original: Option<OsString>) -> Result<OsString> {
    match original {
        None => Ok(env::join_paths(paths)?),
        Some(original) => {
            let orig = env::split_paths(&original);
            let new_iter = paths.iter().cloned().chain(orig);
            Ok(env::join_paths(new_iter)?)
        }
    }
}
/// Prepend paths to an environment variable
Prepend paths to an environment variable
Prepend paths to an environment variable
fn augment_search(paths: &[PathBuf], original: Option<OsString>) -> Result<OsString> {
    match original {
        None => Ok(env::join_paths(paths)?),
        Some(original) => {
            let orig = env::split_paths(&original);
            let new_iter = paths.iter().cloned().chain(orig);
            Ok(env::join_paths(new_iter)?)
        }
    }
}
fn augment_search ( paths : & [ PathBuf ] , original : Option < OsString > ) -> Result < OsString > { match original { None => Ok ( env :: join_paths ( paths ) ? ) , Some ( original ) => { let orig = env :: split_paths ( & original ) ; let new_iter = paths . iter ( ) . cloned ( ) . chain ( orig ) ; Ok ( env :: join_paths ( new_iter ) ? ) } } }
Prepend paths to an environment variable
Prepend paths to an environment variable
paths
&[PathBuf]
original
Option<OsString>