fix beta build

This commit is contained in:
Skgland
2021-06-02 16:43:10 +02:00
parent 87ef3519d9
commit e08c302756
4 changed files with 69 additions and 101 deletions

View File

@@ -9,7 +9,7 @@ license = "BSD-3-Clause"
[dependencies]
indexmap = "1.0.2"
lexical = "2.1.0"
lexical = "5.2.1"
ordered-float = "0.5.0"
rug = { optional = true, version = "1.4.0" }
num-rug-adapter = { optional = true, path = "../num-rug-adapter" }

View File

@@ -555,7 +555,7 @@ impl<'a, R: Read> Lexer<'a, R> {
fn vacate_with_float(&mut self, mut token: String) -> Token {
self.return_char(token.pop().unwrap());
let result = OrderedFloat(parse_lossy::<f64, _>(token.as_bytes()));
let result = OrderedFloat(parse_lossy::<f64, _>(token.as_bytes()).unwrap());
Token::Constant(Constant::Float(result))
}
@@ -633,13 +633,13 @@ impl<'a, R: Read> Lexer<'a, R> {
token.push(self.skip_char()?);
}
let n = OrderedFloat(parse_lossy::<f64, _>(token.as_bytes()));
let n = OrderedFloat(parse_lossy::<f64, _>(token.as_bytes()).unwrap());
Ok(Token::Constant(Constant::Float(n)))
} else {
return Ok(self.vacate_with_float(token));
}
} else {
let n = OrderedFloat(parse_lossy::<f64, _>(token.as_bytes()));
let n = OrderedFloat(parse_lossy::<f64, _>(token.as_bytes()).unwrap());
Ok(Token::Constant(Constant::Float(n)))
}
} else {