pub fn resource_content_path(path: &str) -> String {
    match File::open(path) {
        Ok(mut path) => {
            let mut content = String::new();
            match path.read_to_string(&mut content) {
                Ok(_) => content,
                Err(err) => panic!("Error while reading file contents: {}.", err)
            }
        }
        Err(err) =>
            panic!("Error while opening file {} while reading resource contents: {}.", path, err),
    }
}
/// Get contents of file of given path as string.
Get contents of file of given path as string.
Get contents of file of given path as string .
pub fn resource_content_path(path: &str) -> String {
    match File::open(path) {
        Ok(mut path) => {
            let mut content = String::new();
            match path.read_to_string(&mut content) {
                Ok(_) => content,
                Err(err) => panic!("Error while reading file contents: {}.", err)
            }
        }
        Err(err) =>
            panic!("Error while opening file {} while reading resource contents: {}.", path, err),
    }
}
pub fn resource_content_path ( path : & str ) -> String { match File :: open ( path ) { Ok ( mut path ) => { let mut content = String :: new ( ) ; match path . read_to_string ( & mut content ) { Ok ( _ ) => content , Err ( err ) => panic ! ( " " err ) } } Err ( err ) => panic ! ( " " path err ) , } }
Get contents of file of given path as string.
Get contents of file of given path as string .
path
&str