summaryrefslogtreecommitdiff
path: root/solutions
diff options
context:
space:
mode:
Diffstat (limited to 'solutions')
-rw-r--r--solutions/13_error_handling/errors6.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/solutions/13_error_handling/errors6.rs b/solutions/13_error_handling/errors6.rs
index 429d3ea..8679361 100644
--- a/solutions/13_error_handling/errors6.rs
+++ b/solutions/13_error_handling/errors6.rs
@@ -24,7 +24,7 @@ impl ParsePosNonzeroError {
Self::Creation(err)
}
- fn from_parseint(err: ParseIntError) -> Self {
+ fn from_parse_int(err: ParseIntError) -> Self {
Self::ParseInt(err)
}
}
@@ -44,7 +44,7 @@ impl PositiveNonzeroInteger {
fn parse(s: &str) -> Result<Self, ParsePosNonzeroError> {
// Return an appropriate error instead of panicking when `parse()`
// returns an error.
- let x: i64 = s.parse().map_err(ParsePosNonzeroError::from_parseint)?;
+ let x: i64 = s.parse().map_err(ParsePosNonzeroError::from_parse_int)?;
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Self::new(x).map_err(ParsePosNonzeroError::from_creation)
}