We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc5e8e8 commit 0504884Copy full SHA for 0504884
src/ast.rs
@@ -70,7 +70,7 @@ impl<'a> From<Value<'a>> for serde_json::Value {
70
Value::NullKeyword(_) => serde_json::Value::Null,
71
Value::NumberLit(num) => {
72
// check if this is a hexadecimal literal (0x or 0X prefix)
73
- let num_str = num.value.trim_start_matches('-').trim_start_matches('+');
+ let num_str = num.value.trim_start_matches(['-', '+']);
74
if num_str.len() > 2 && (num_str.starts_with("0x") || num_str.starts_with("0X")) {
75
// Parse hexadecimal and convert to decimal
76
let hex_part = &num_str[2..];
0 commit comments