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 }
|
defmt = { version = "0.3", optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
default = ["std"]
|
||||||
defmt = ["dep:defmt"]
|
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 std::fmt::{Display, Formatter};
|
||||||
|
|
||||||
use typenum::Integer;
|
use typenum::Integer;
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
mod display;
|
mod display;
|
||||||
pub mod types;
|
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::{
|
use std::{
|
||||||
marker::PhantomData,
|
marker::PhantomData,
|
||||||
ops::{
|
ops::{
|
||||||
|
Loading…
Reference in New Issue
Block a user