Make std optional
This commit is contained in:
parent
cfc0506dc0
commit
ed4d0ee1fd
@ -17,4 +17,6 @@ num-traits = "0.2"
|
||||
defmt = { version = "0.3", optional = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
defmt = ["dep:defmt"]
|
||||
std = []
|
||||
|
@ -1,3 +1,6 @@
|
||||
#[cfg(not(feature = "std"))]
|
||||
use core::fmt::{Display, Formatter};
|
||||
#[cfg(feature = "std")]
|
||||
use std::fmt::{Display, Formatter};
|
||||
|
||||
use typenum::Integer;
|
||||
|
@ -1,6 +1,15 @@
|
||||
mod display;
|
||||
pub mod types;
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use core::{
|
||||
marker::PhantomData,
|
||||
ops::{
|
||||
Add, AddAssign, Deref, DerefMut, Div, DivAssign, Mul, MulAssign, Neg, Rem, RemAssign, Sub,
|
||||
SubAssign,
|
||||
},
|
||||
};
|
||||
#[cfg(feature = "std")]
|
||||
use std::{
|
||||
marker::PhantomData,
|
||||
ops::{
|
||||
|
Loading…
Reference in New Issue
Block a user