X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/02337846140cac7ff30e3cc64fd3c9a024bee17c..375923e203d323dadc639434ebc1f29530f4ac2a:/src/part03.rs diff --git a/src/part03.rs b/src/part03.rs index 3dfb2ab..2a5eb16 100644 --- a/src/part03.rs +++ b/src/part03.rs @@ -60,7 +60,6 @@ fn read_vec() -> Vec { //@ the return type of the function), but that's a bit too much magic for my taste. We are //@ being more explicit here: `parse::` is `parse` with its generic type set to `i32`. match line.trim().parse::() { - //@ `parse` returns again a `Result`, and this time we use a `match` to handle errors //@ (like, the user entering something that is not a number). //@ This is a common pattern in Rust: Operations that could go wrong will return