pub fn test_painic_fn()
{
}
use std::fs::File;
pub fn test_panic_resume() {
let f = File::open("hello.txt").unwrap();
}
use std::io;
use std::io::Read;
pub fn read_username_from_file() -> Result<String, io::Error> {
let f = File::open("hello.txt");
let mut f = match f {
Ok(file) => file,
Err(e) =>{println!("ssss111"); return Err(e)},
};
let mut s = String::new();
match f.read_to_string(&mut s) {
Ok(_) => Ok(s),
Err(e) => {
println!("sssss");
Err(e)},
}
}