diff --git a/src/lib.rs b/src/lib.rs index 1854fbe..89b4d5f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -231,12 +231,9 @@ pub enum PodCastError { /// exact. AlignmentMismatch, } +#[cfg(not(target_arch = "spirv"))] impl core::fmt::Display for PodCastError { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - // Currently, this is unlikely to work for the spirv targets - #[cfg(target_arch = "spirv")] - write!(f, "PodCastError"); - #[cfg(not(target_arch = "spirv"))] write!(f, "{:?}", self) } }