Skip to content

Commit ae5fc7d

Browse files
Fix no-bigint build failures, check those in CI (#138)
1 parent 82d7146 commit ae5fc7d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ repos:
2525
types: [rust]
2626
language: system
2727
pass_filenames: false
28+
- id: check-without-num-bigint
29+
name: Check without num-bigint feature
30+
entry: cargo check --no-default-features --package jiter
31+
types: [rust]
32+
language: system
33+
pass_filenames: false
2834
- id: test
2935
name: Test
3036
entry: cargo test --test main

crates/jiter/src/value.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ fn take_value_recursive<'j, 's>(
309309
})?;
310310
match n {
311311
NumberAny::Int(NumberInt::Int(int)) => JsonValue::Int(int),
312+
#[cfg(feature = "num-bigint")]
312313
NumberAny::Int(NumberInt::BigInt(big_int)) => JsonValue::BigInt(big_int),
313314
NumberAny::Float(float) => JsonValue::Float(float),
314315
}
@@ -386,6 +387,7 @@ fn take_value_recursive<'j, 's>(
386387
})?;
387388
match n {
388389
NumberAny::Int(NumberInt::Int(int)) => JsonValue::Int(int),
390+
#[cfg(feature = "num-bigint")]
389391
NumberAny::Int(NumberInt::BigInt(big_int)) => JsonValue::BigInt(big_int),
390392
NumberAny::Float(float) => JsonValue::Float(float),
391393
}

0 commit comments

Comments
 (0)