fn string_from_path(path: PathBuf) -> Result<String, String> {
    match path.into_os_string().into_string() {
        Ok(path) => Ok(path),
        Err(_) => Err("Could not convert path to string.".to_string())
    }
}
/// Converts a PathBuf into a String
Converts a PathBuf into a String
Converts a PathBuf into a String
fn string_from_path(path: PathBuf) -> Result<String, String> {
    match path.into_os_string().into_string() {
        Ok(path) => Ok(path),
        Err(_) => Err("Could not convert path to string.".to_string())
    }
}
fn string_from_path ( path : PathBuf ) -> Result < String , String > { match path . into_os_string ( ) . into_string ( ) { Ok ( path ) => Ok ( path ) , Err ( _ ) => Err ( " " . to_string ( ) ) } }
Converts a PathBuf into a String
Converts a PathBuf into a String
path
PathBuf
path
PathBuf