pub fn read_username_from_file2() -> std::result::Result<String, std::io::Error> {
    let mut f = File::open("hello.txt")?; // ? throw if found error
    let mut s = String::new();
    f.read_to_string(&mut s)?; // ? throw if found error
    Ok(s)
}
// new method: using ? mean throw error if found
// like async await in js but for error
new method: using . mean throw error if found
like async await in js but for error
new method : using . mean throw error if found like async await in js but for error
pub fn read_username_from_file2() -> std::result::Result<String, std::io::Error> {
    let mut f = File::open("hello.txt")?; // ? throw if found error
    let mut s = String::new();
    f.read_to_string(&mut s)?; // ? throw if found error
    Ok(s)
}
pub fn read_username_from_file2 ( ) -> std :: result :: Result < String , std :: io :: Error > { let mut f = File :: open ( " " ) ? ; // ? throw if found error let mut s = String :: new ( ) ; f . read_to_string ( & mut s ) ? ; // ? throw if found error Ok ( s ) }
new method: using ?
new method : using ?