Skip to content

Commit

Permalink
Fixes compile issue when disable bigint feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Icemic committed Apr 6, 2024
1 parent 26e2daf commit e295e78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/bindings/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ use std::hash::Hash;
use chrono::{DateTime, Utc};
use libquickjspp_sys as q;

#[cfg(feature = "bigint")]
use crate::utils::create_bigint;
#[cfg(feature = "chrono")]
use crate::utils::create_date;
use crate::utils::{
add_array_element, add_object_property, create_bigint, create_bool, create_date,
create_empty_array, create_empty_object, create_float, create_function, create_int,
create_null, create_string,
add_array_element, add_object_property, create_bool, create_empty_array, create_empty_object,
create_float, create_function, create_int, create_null, create_string,
};
use crate::{ExecutionError, ValueError};

Expand Down
1 change: 1 addition & 0 deletions src/serde/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
JsTag::CatchOffset => visitor.visit_unit(),
JsTag::Uninitialized => visitor.visit_unit(),
JsTag::FunctionBytecode => visitor.visit_unit(),
#[cfg(feature = "bigint")]
JsTag::BigInt => {
let bigint = current.to_bigint()?;
visitor.visit_i64(bigint.as_i64().ok_or(Error::BigIntOverflow)?)
Expand Down

0 comments on commit e295e78

Please sign in to comment.