Skip to content

Commit

Permalink
Merge pull request #919 from chxry/main
Browse files Browse the repository at this point in the history
Fix compile on thumbv6m
  • Loading branch information
schungx authored Sep 30, 2024
2 parents a42efec + af3647c commit 37011d2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ smallvec = { version = "1.7.0", default-features = false, features = ["union", "
thin-vec = { version = "0.2.13", default-features = false }
ahash = { version = "0.8.2", default-features = false, features = ["compile-time-rng"] }
num-traits = { version = "0.2.0", default-features = false }
once_cell = { version = "1.7.0", default-features = false, features = ["race"] }
once_cell = { version = "1.19.0", default-features = false, features = ["critical-section"] }
bitflags = { version = "2.0.0", default-features = false }
smartstring = { version = "1.0.0", default-features = false }
rhai_codegen = { version = "2.1.0", path = "codegen" }

no-std-compat = { git = "https://gitlab.com/jD91mZM2/no-std-compat", version = "0.4.1", default-features = false, features = ["alloc", "compat_sync"], optional = true }
no-std-compat = { git = "https://gitlab.com/jD91mZM2/no-std-compat", version = "0.4.1", default-features = false, features = ["alloc"], optional = true }
libm = { version = "0.2.0", default-features = false, optional = true }
hashbrown = { version = "0.14.0", optional = true }
core-error = { version = "0.0.0", default-features = false, features = ["alloc"], optional = true }
Expand All @@ -54,7 +54,7 @@ std = ["once_cell/std", "ahash/std", "num-traits/std", "smartstring/std"]
#! ### Enable Special Functionalities

## Require that all data types implement `Send + Sync` (for multi-threaded usage).
sync = []
sync = ["no-std-compat/compat_sync"]
## Add support for the [`Decimal`](https://crates.io/crates/rust_decimal) data type (acts as the system floating-point type under `no_float`).
decimal = ["rust_decimal"]
## Enable serialization/deserialization of Rhai data types via [`serde`](https://crates.io/crates/serde).
Expand Down
6 changes: 1 addition & 5 deletions src/config/hashing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ pub use crate::api::deprecated::config::hashing::{get_ahash_seed, set_ahash_seed
/// ```
#[inline(always)]
pub fn set_hashing_seed(new_seed: Option<[u64; 4]>) -> Result<(), Option<[u64; 4]>> {
#[cfg(feature = "std")]
return HASHING_SEED.set(new_seed);

#[cfg(not(feature = "std"))]
return HASHING_SEED.set(new_seed.into()).map_err(|err| *err);
HASHING_SEED.set(new_seed)
}

/// Get the current hashing Seed.
Expand Down
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,8 @@ type ExclusiveRange = std::ops::Range<INT>;
/// An inclusive integer range.
type InclusiveRange = std::ops::RangeInclusive<INT>;

#[cfg(feature = "std")]
use once_cell::sync::OnceCell;

#[cfg(not(feature = "std"))]
use once_cell::race::OnceBox as OnceCell;

pub use api::build_type::{CustomType, TypeBuilder};
#[cfg(not(feature = "no_custom_syntax"))]
pub use api::custom_syntax::Expression;
Expand Down

0 comments on commit 37011d2

Please sign in to comment.