Format code.

This commit is contained in:
Sebastian Schmidt 2021-07-21 13:39:19 +03:00
parent 0cd55da484
commit 094c2d59dc

View File

@ -360,11 +360,12 @@ fn partial_tokens_to_tokens(mut tokens: &[PartialToken]) -> EvalexprResult<Vec<T
// scientific notation number of the form `<coefficient>e{+,-}<exponent>`, // scientific notation number of the form `<coefficient>e{+,-}<exponent>`,
// for example [Literal("10e"), Minus, Literal("3")] => "1e-3".parse(). // for example [Literal("10e"), Minus, Literal("3")] => "1e-3".parse().
match (second, third) { match (second, third) {
(Some(s), Some(t)) (Some(second), Some(third))
if s == PartialToken::Minus || s == PartialToken::Plus => if second == PartialToken::Minus
|| second == PartialToken::Plus =>
{ {
if let Ok(number) = if let Ok(number) =
format!("{}{}{}", literal, s, t).parse::<FloatType>() format!("{}{}{}", literal, second, third).parse::<FloatType>()
{ {
cutoff = 3; cutoff = 3;
Some(Token::Float(number)) Some(Token::Float(number))