From 291b2d251395ca85b66825a46d92e34fa6e369d4 Mon Sep 17 00:00:00 2001 From: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> Date: Sun, 13 Jun 2021 15:12:24 +0100 Subject: [PATCH] Just gate the Display impl instead (#69) The old version didn't compile (because of the extra semicolon) --- src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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) } }