or how bout we chain method calls?

fn read_bitcoin_file() -> Result {

let mut bitcoin_amount = String::new();

File::open("bitcoin_amount_file.txt")?.read_to_string(&mut bitcoin_amount)?;

Ok(bitcoin_amount.trim().parse::().unwrap())

}

Reply to this note

Please Login to reply.

Discussion

No replies yet.