Fixed warnings from rust-lang/rfcs#1445.
This commit is contained in:
parent
bb50154d8c
commit
0b3218289f
|
@ -470,11 +470,14 @@ impl Parsed {
|
||||||
|
|
||||||
Ok(datetime)
|
Ok(datetime)
|
||||||
} else if let Some(timestamp) = self.timestamp {
|
} else if let Some(timestamp) = self.timestamp {
|
||||||
|
use super::ParseError as PE;
|
||||||
|
use super::ParseErrorKind::{OutOfRange, Impossible};
|
||||||
|
|
||||||
// if date and time is problematic already, there is no point proceeding.
|
// if date and time is problematic already, there is no point proceeding.
|
||||||
// we at least try to give a correct error though.
|
// we at least try to give a correct error though.
|
||||||
match (date, time) {
|
match (date, time) {
|
||||||
(Err(OUT_OF_RANGE), _) | (_, Err(OUT_OF_RANGE)) => return Err(OUT_OF_RANGE),
|
(Err(PE(OutOfRange)), _) | (_, Err(PE(OutOfRange))) => return Err(OUT_OF_RANGE),
|
||||||
(Err(IMPOSSIBLE), _) | (_, Err(IMPOSSIBLE)) => return Err(IMPOSSIBLE),
|
(Err(PE(Impossible)), _) | (_, Err(PE(Impossible))) => return Err(IMPOSSIBLE),
|
||||||
(_, _) => {} // one of them is insufficient
|
(_, _) => {} // one of them is insufficient
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue