// Function that create a file and then write provided data into it
//
// Will panic if error
Function that create a file and then write provided data into it
Will panic if error
Function that create a file and then write provided data into it Will panic if error
pub fn write_to_file(path: &str, data: &str) {
    let mut file = create_file(path);
    match file.write_all(data.as_bytes()) {
        Ok(_) => (),
        Err(error) => {
            panic!("Error writing to file: {:?}\n{}",
                   file, error)
        },
    };
}
pub fn write_to_file ( path : & str , data : & str ) { let mut file = create_file ( path ) ; match file . write_all ( data . as_bytes ( ) ) { Ok ( _ ) => ( ) , Err ( error ) => { panic ! ( " \n " file error ) } , } ; }
Function that create a file and then write provided data into it
Will panic if error
Function that create a file and then write provided data into it Will panic if error
path
&str
data
&str