In Rust, is it possible to chain more functions after ok, unwrap or expect?
Given code:
stdin()
.read_line(&mut guess)
.ok()
.expect("Couldn't read line!");
If I want to trim
the string, is there a syntax like this?
stdin()
.read_line(&mut guess)
.ok().trim()
.expect("Couldn't read line!");
I know using match I could do it https://stackoverflow.com/a/56264723/15504324