Skip to content

Commit

Permalink
Fix no-bigint build failures, check those in CI (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime authored Sep 18, 2024
1 parent 82d7146 commit ae5fc7d
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 ae5fc7d

Please sign in to comment.