fix no_std
This commit is contained in:
parent
c12219dd5a
commit
44ff54160c
@ -1,7 +1,7 @@
|
|||||||
#[cfg(not(feature = "std"))]
|
#[cfg(not(feature = "std"))]
|
||||||
use core::fmt::{Display, Formatter};
|
use core::fmt::{self, Display, Formatter};
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
use std::fmt::{Display, Formatter};
|
use std::fmt::{self, Display, Formatter};
|
||||||
|
|
||||||
use typenum::Integer;
|
use typenum::Integer;
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ where
|
|||||||
Candela: Integer,
|
Candela: Integer,
|
||||||
T: Display + 'static,
|
T: Display + 'static,
|
||||||
{
|
{
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||||
write!(f, "{}", self.value)?;
|
write!(f, "{}", self.value)?;
|
||||||
// derived units with special symbols
|
// derived units with special symbols
|
||||||
display_special_unit!(f, Self,
|
display_special_unit!(f, Self,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
mod display;
|
mod display;
|
||||||
pub mod types;
|
pub mod types;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user