fix: handle empty case

This commit is contained in:
Levy A.
2025-04-17 20:20:57 -03:00
parent 32d59b8c78
commit 5fd2ed0bae

View File

@@ -878,7 +878,10 @@ fn parse_numeric_str(text: &str) -> Result<(OwnedValueType, &str), ()> {
let text = text.trim();
let bytes = text.as_bytes();
if matches!(bytes, [b'e', ..] | [b'E', ..] | [b'.', b'e' | b'E', ..]) {
if matches!(
bytes,
[] | [b'e', ..] | [b'E', ..] | [b'.', b'e' | b'E', ..]
) {
return Err(());
}