Avoid pulling in std for no-std.
This commit is contained in:
@@ -7,6 +7,9 @@ use crate::token::Position;
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
use crate::parser::FLOAT;
|
||||
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
use num_traits::*;
|
||||
|
||||
use num_traits::{
|
||||
identities::Zero, CheckedAdd, CheckedDiv, CheckedMul, CheckedNeg, CheckedRem, CheckedShl,
|
||||
CheckedShr, CheckedSub,
|
||||
|
@@ -6,6 +6,9 @@ use crate::token::Position;
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
use crate::parser::FLOAT;
|
||||
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
use num_traits::*;
|
||||
|
||||
use crate::stdlib::{boxed::Box, format, i32, i64};
|
||||
|
||||
#[cfg(feature = "only_i32")]
|
||||
|
@@ -608,6 +608,7 @@ impl Hash for CustomExpr {
|
||||
#[derive(Debug, PartialEq, PartialOrd, Clone)]
|
||||
pub struct FloatWrapper(pub FLOAT, pub Position);
|
||||
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
impl Hash for FloatWrapper {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
state.write(&self.0.to_le_bytes());
|
||||
|
Reference in New Issue
Block a user