Concise-ify code
This commit is contained in:
parent
741e5f7f9b
commit
0dabbc700b
@ -451,11 +451,10 @@ impl Parser {
|
|||||||
use self::TokenType::*;
|
use self::TokenType::*;
|
||||||
let mut ds = String::new();
|
let mut ds = String::new();
|
||||||
loop {
|
loop {
|
||||||
let xxx = self.next();
|
match self.next() {
|
||||||
match xxx {
|
|
||||||
Underscore => continue,
|
Underscore => continue,
|
||||||
DigitGroup(ref s) => ds.push_str(s),
|
DigitGroup(ref s) => ds.push_str(s),
|
||||||
x => break,
|
_ => break,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(ds)
|
Ok(ds)
|
||||||
|
Loading…
Reference in New Issue
Block a user