remove superfluous is_float variable
@@ -69,19 +69,17 @@ pub(crate) fn eat_number<I: Iterator<Item = Token>>(
}
let mut dec = String::new();
- let mut is_float = false;
let next_tok = *toks.peek().unwrap();
if next_tok.kind == '.' {
toks.next();
- is_float = true;
eat_whole_number(toks, &mut dec);
- }
- if dec.is_empty() && is_float {
+ if dec.is_empty() {
return Err(("Expected digit.", next_tok.pos()).into());
}
+ }
let mut times_ten = String::new();
let mut times_ten_is_postive = true;
