Just gate the Display impl instead (#69)

The old version didn't compile (because of the extra semicolon)
This commit is contained in:
Daniel McNab 2021-06-13 15:12:24 +01:00 committed by GitHub
parent 8c8b0a71e9
commit 291b2d2513
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}
}