We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb50154 commit 0b32182Copy full SHA for 0b32182
1 file changed
src/format/parsed.rs
@@ -470,11 +470,14 @@ impl Parsed {
470
471
Ok(datetime)
472
} else if let Some(timestamp) = self.timestamp {
473
+ use super::ParseError as PE;
474
+ use super::ParseErrorKind::{OutOfRange, Impossible};
475
+
476
// if date and time is problematic already, there is no point proceeding.
477
// we at least try to give a correct error though.
478
match (date, time) {
- (Err(OUT_OF_RANGE), _) | (_, Err(OUT_OF_RANGE)) => return Err(OUT_OF_RANGE),
- (Err(IMPOSSIBLE), _) | (_, Err(IMPOSSIBLE)) => return Err(IMPOSSIBLE),
479
+ (Err(PE(OutOfRange)), _) | (_, Err(PE(OutOfRange))) => return Err(OUT_OF_RANGE),
480
+ (Err(PE(Impossible)), _) | (_, Err(PE(Impossible))) => return Err(IMPOSSIBLE),
481
(_, _) => {} // one of them is insufficient
482
}
483
0 commit comments