Refactoring matching
This commit is contained in:
parent
7b31609418
commit
b53e9d940f
|
@ -300,28 +300,7 @@ pub fn parse<'a, I>(parsed: &mut Parsed, mut s: &str, items: I) -> ParseResult<(
|
|||
s = &s[2..];
|
||||
}
|
||||
|
||||
Nanosecond => {
|
||||
if s.starts_with(".") {
|
||||
let nano = try_consume!(scan::nanosecond(&s[1..]));
|
||||
try!(parsed.set_nanosecond(nano));
|
||||
}
|
||||
}
|
||||
|
||||
Nanosecond3 => {
|
||||
if s.starts_with(".") {
|
||||
let nano = try_consume!(scan::nanosecond(&s[1..]));
|
||||
try!(parsed.set_nanosecond(nano));
|
||||
}
|
||||
}
|
||||
|
||||
Nanosecond6 => {
|
||||
if s.starts_with(".") {
|
||||
let nano = try_consume!(scan::nanosecond(&s[1..]));
|
||||
try!(parsed.set_nanosecond(nano));
|
||||
}
|
||||
}
|
||||
|
||||
Nanosecond9 => {
|
||||
Nanosecond | Nanosecond3 | Nanosecond6 | Nanosecond9=> {
|
||||
if s.starts_with(".") {
|
||||
let nano = try_consume!(scan::nanosecond(&s[1..]));
|
||||
try!(parsed.set_nanosecond(nano));
|
||||
|
|
Loading…
Reference in New Issue