Clippy
This commit is contained in:
parent
8eec9c6759
commit
2ba158a0d4
7 changed files with 41 additions and 18 deletions
|
|
@ -28,9 +28,10 @@ pub fn parse_number(input: &str) -> IResult<&str, Value> {
|
|||
Some((_fsign, fdigits)) => {
|
||||
// Combine integer and fractional parts
|
||||
let combined_parts = format!(
|
||||
"{}{}",
|
||||
format!("{}{}", sign.unwrap_or('+'), digits),
|
||||
format!(".{}", fdigits)
|
||||
"{}{}.{}",
|
||||
sign.unwrap_or('+'),
|
||||
digits,
|
||||
fdigits
|
||||
);
|
||||
// Parse the combined parts as a floating-point number
|
||||
let value = combined_parts.parse::<f64>()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue