summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2017-11-11 04:06:00 +0100
committerMatthias Beyer <mail@beyermatthias.de>2017-11-11 04:06:00 +0100
commit8222ca0769259c73da0d77793f68d14fafa3300f (patch)
tree79459c4bf3cbfdf5e1d6b8a86d325947fe7e0b64
parent7d034fa0e2eba2466dcfdd1c3b8303b744352341 (diff)
Replace unimplemented!() matcher with actual pattern
-rw-r--r--src/timetype.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/timetype.rs b/src/timetype.rs
index eb840d3..8b7cf26 100644
--- a/src/timetype.rs
+++ b/src/timetype.rs
@@ -638,7 +638,9 @@ fn add(a: Box<TimeType>, b: Box<TimeType>) -> Result<TimeType> {
(TT::EndOfHour(e), other) => Err(KE::from_kind(KEK::CannotAdd(other, TT::EndOfHour(e)))),
(other, TT::EndOfHour(e)) => Err(KE::from_kind(KEK::CannotAdd(other, TT::EndOfHour(e)))),
- _ => unimplemented!(),
+ (TT::EndOfMinute(e), other) => Err(KE::from_kind(KEK::CannotAdd(other, TT::EndOfMinute(e)))),
+ // unreachable, just for completeness:
+ //(other, TT::EndOfMinute(e)) => Err(KE::from_kind(KEK::CannotAdd(other, TT::EndOfMinute(e)))),
}
}