Add no_std and forbid(unsafe) in utils

This commit is contained in:
2021-03-23 19:12:09 +01:00
parent 00fcdf1031
commit df05c06270
3 changed files with 34 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
//! The Float type used throughout the ecosystem
#![no_std]
#![cfg_attr(feature = "fast-float", feature(core_intrinsics))]
/// Type used for floats, configure with the `f32` feature
@@ -12,9 +12,9 @@ pub type Float = f64;
/// Associated constants for [`Float`]
pub mod consts {
#[cfg(feature = "f32")]
pub use std::f32::consts::*;
pub use core::f32::consts::*;
#[cfg(not(feature = "f32"))]
pub use std::f64::consts::*;
pub use core::f64::consts::*;
}
#[cfg(feature = "fast-float")]