Skip to content

Commit 0504884

Browse files
committed
review
1 parent dc5e8e8 commit 0504884

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl<'a> From<Value<'a>> for serde_json::Value {
7070
Value::NullKeyword(_) => serde_json::Value::Null,
7171
Value::NumberLit(num) => {
7272
// check if this is a hexadecimal literal (0x or 0X prefix)
73-
let num_str = num.value.trim_start_matches('-').trim_start_matches('+');
73+
let num_str = num.value.trim_start_matches(['-', '+']);
7474
if num_str.len() > 2 && (num_str.starts_with("0x") || num_str.starts_with("0X")) {
7575
// Parse hexadecimal and convert to decimal
7676
let hex_part = &num_str[2..];

0 commit comments

Comments
 (0)