summaryrefslogtreecommitdiff
path: root/exercises/13_error_handling/errors6.rs
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/13_error_handling/errors6.rs')
-rw-r--r--exercises/13_error_handling/errors6.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/exercises/13_error_handling/errors6.rs b/exercises/13_error_handling/errors6.rs
index 0652abd..b656c61 100644
--- a/exercises/13_error_handling/errors6.rs
+++ b/exercises/13_error_handling/errors6.rs
@@ -35,7 +35,7 @@ impl PositiveNonzeroInteger {
fn new(value: i64) -> Result<Self, CreationError> {
match value {
x if x < 0 => Err(CreationError::Negative),
- x if x == 0 => Err(CreationError::Zero),
+ 0 => Err(CreationError::Zero),
x => Ok(Self(x as u64)),
}
}
@@ -55,7 +55,6 @@ fn main() {
#[cfg(test)]
mod test {
use super::*;
- use std::num::IntErrorKind;
#[test]
fn test_parse_error() {