Skip to content

Commit

Permalink
Check with bigint disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime committed Sep 13, 2024
1 parent b09b969 commit ac903d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ repos:
types: [rust]
language: system
pass_filenames: false
- id: check-without-num-bigint
name: Check without num-bigint feature
entry: cargo check --no-default-features --package jiter
types: [rust]
language: system
pass_filenames: false
- id: test
name: Test
entry: cargo test --test main
Expand Down
2 changes: 2 additions & 0 deletions crates/jiter/src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ fn take_value_recursive<'j, 's>(
})?;
match n {
NumberAny::Int(NumberInt::Int(int)) => JsonValue::Int(int),
#[cfg(feature = "num-bigint")]
NumberAny::Int(NumberInt::BigInt(big_int)) => JsonValue::BigInt(big_int),
NumberAny::Float(float) => JsonValue::Float(float),
}
Expand Down Expand Up @@ -386,6 +387,7 @@ fn take_value_recursive<'j, 's>(
})?;
match n {
NumberAny::Int(NumberInt::Int(int)) => JsonValue::Int(int),
#[cfg(feature = "num-bigint")]
NumberAny::Int(NumberInt::BigInt(big_int)) => JsonValue::BigInt(big_int),
NumberAny::Float(float) => JsonValue::Float(float),
}
Expand Down

0 comments on commit ac903d0

Please sign in to comment.