Fix no_std builds by pulling in num-traits.
This commit is contained in:
parent
3902e49a7d
commit
1dacf21a84
@ -38,7 +38,7 @@ internals = [] # expose internal data structures
|
||||
unicode-xid-ident = ["unicode-xid"] # allow Unicode Standard Annex #31 for identifiers.
|
||||
|
||||
# compiling for no-std
|
||||
no_std = [ "no_closure", "hashbrown", "core-error", "libm", "ahash" ]
|
||||
no_std = [ "no_closure", "num-traits/libm", "hashbrown", "core-error", "libm", "ahash" ]
|
||||
|
||||
[profile.release]
|
||||
lto = "fat"
|
||||
@ -51,6 +51,11 @@ version = "0.2.1"
|
||||
default_features = false
|
||||
optional = true
|
||||
|
||||
[dependencies.num-traits]
|
||||
version = "0.2.11"
|
||||
default-features = false
|
||||
optional = true
|
||||
|
||||
[dependencies.core-error]
|
||||
version = "0.0.0"
|
||||
default_features = false
|
||||
|
@ -52,6 +52,10 @@ use crate::stdlib::{
|
||||
#[cfg(not(feature = "no_function"))]
|
||||
use crate::stdlib::{collections::HashSet, string::String};
|
||||
|
||||
#[cfg(feature = "no_std")]
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
use num_traits::float::Float;
|
||||
|
||||
/// Extract the property name from a getter function name.
|
||||
#[inline(always)]
|
||||
fn extract_prop_from_getter(_fn_name: &str) -> Option<&str> {
|
||||
|
Loading…
Reference in New Issue
Block a user