diff --git a/src/any.rs b/src/any.rs index 4ae08f38..78fa76d9 100644 --- a/src/any.rs +++ b/src/any.rs @@ -206,6 +206,9 @@ impl fmt::Display for Dynamic { Union::Array(value) => write!(f, "{:?}", value), Union::Map(value) => write!(f, "#{:?}", value), Union::Module(value) => write!(f, "{:?}", value), + + #[cfg(not(feature = "no_std"))] + Union::Variant(value) if value.is::() => write!(f, ""), Union::Variant(_) => write!(f, "?"), } } @@ -224,6 +227,9 @@ impl fmt::Debug for Dynamic { Union::Array(value) => write!(f, "{:?}", value), Union::Map(value) => write!(f, "#{:?}", value), Union::Module(value) => write!(f, "{:?}", value), + + #[cfg(not(feature = "no_std"))] + Union::Variant(value) if value.is::() => write!(f, ""), Union::Variant(_) => write!(f, ""), } }