File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
solutions/13_error_handling Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -29,15 +29,15 @@ impl ParsePosNonzeroError {
29
29
}
30
30
}
31
31
32
- /// As an alternative solution, implementing the `From` trait allows for the
33
- /// automatic conversion from a `ParseIntError` into a `ParsePosNonzeroError`
34
- /// using the `?` operator, without the need to call `map_err`.
35
- ///
36
- /// ```
37
- /// let x: i64 = s.parse()?;
38
- /// ```
39
- ///
40
- /// Traits like `From` will be dealt with in later exercises.
32
+ // As an alternative solution, implementing the `From` trait allows for the
33
+ // automatic conversion from a `ParseIntError` into a `ParsePosNonzeroError`
34
+ // using the `?` operator, without the need to call `map_err`.
35
+ //
36
+ // ```
37
+ // let x: i64 = s.parse()?;
38
+ // ```
39
+ //
40
+ // Traits like `From` will be dealt with in later exercises.
41
41
impl From < ParseIntError > for ParsePosNonzeroError {
42
42
fn from ( err : ParseIntError ) -> Self {
43
43
ParsePosNonzeroError :: ParseInt ( err)
You can’t perform that action at this time.
0 commit comments