fn is_valid_install_dir(s: &OsStr) -> Result<(), OsString> {
    let path = Path::new(&s);

    if !path.exists() {
        return Err("install-dir does not exist".into());
    }

    if !path.is_dir() {
        return Err("install-dir is not a directory".into());
    }

    Ok(())
}
// Ensure that the installation dir exists and is a directory.
Ensure that the installation dir exists and is a directory.
Ensure that the installation dir exists and is a directory .
fn is_valid_install_dir(s: &OsStr) -> Result<(), OsString> {
    let path = Path::new(&s);
    if !path.exists() {
        return Err("install-dir does not exist".into());
    }
    if !path.is_dir() {
        return Err("install-dir is not a directory".into());
    }
    Ok(())
}
fn is_valid_install_dir ( s : & OsStr ) -> Result < ( ) , OsString > { let path = Path :: new ( & s ) ; if ! path . exists ( ) { return Err ( " " . into ( ) ) ; } if ! path . is_dir ( ) { return Err ( " " . into ( ) ) ; } Ok ( ( ) ) }
Ensure that the installation dir exists and is a directory.
Ensure that the installation dir exists and is a directory .
s
&OsStr
s
&OsStr