Skip to content

Commit 36f34ce

Browse files
dannasmanyouknowone
authored andcommitted
disallow consecutive separators when parsing floats
1 parent 51b5f80 commit 36f34ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

literal/src/float.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ fn parse_inner(literal: &[u8]) -> Option<f64> {
3131
// lexical-core's format::PYTHON_STRING is inaccurate
3232
const PYTHON_STRING: u128 = NumberFormatBuilder::rebuild(PYTHON3_LITERAL)
3333
.no_special(false)
34+
.consecutive_digit_separator(false)
3435
.build();
3536
f64::from_lexical_with_options::<PYTHON_STRING>(literal, &Options::new()).ok()
3637
}

0 commit comments

Comments
 (0)