pub fn read_maskfile(maskfile: &Path) -> Result<String, String> {
    let file = File::open(maskfile);
    if file.is_err() {
        return Err("failed to open maskfile.md".to_string());
    }

    let mut file = file.unwrap();
    let mut maskfile_contents = String::new();
    file.read_to_string(&mut maskfile_contents)
        .expect("expected file contents");

    Ok(maskfile_contents)
}
// TODO: try to find maskfile in current directory and maybe parent directories?
// https://github.com/jakedeichert/mask/issues/7
try to find maskfile in current directory and maybe parent directories.
try to find maskfile in current directory and maybe parent directories .
pub fn read_maskfile(maskfile: &Path) -> Result<String, String> {
    let file = File::open(maskfile);
    if file.is_err() {
        return Err("failed to open maskfile.md".to_string());
    }
    let mut file = file.unwrap();
    let mut maskfile_contents = String::new();
    file.read_to_string(&mut maskfile_contents)
        .expect("expected file contents");
    Ok(maskfile_contents)
}
pub fn read_maskfile ( maskfile : & Path ) -> Result < String , String > { let file = File :: open ( maskfile ) ; if file . is_err ( ) { return Err ( " " . to_string ( ) ) ; } let mut file = file . unwrap ( ) ; let mut maskfile_contents = String :: new ( ) ; file . read_to_string ( & mut maskfile_contents ) . expect ( " " ) ; Ok ( maskfile_contents ) }
TODO: try to find maskfile in current directory and maybe parent directories?
TODO : try to find maskfile in current directory and maybe parent directories?
maskfile
&Path