Merge branch 'main' of https://github.com/Lokathor/bytemuck into main

This commit is contained in:
Lokathor 2021-06-13 08:15:28 -06:00
commit 7f8b15e6e9

View File

@ -231,12 +231,9 @@ pub enum PodCastError {
/// exact. /// exact.
AlignmentMismatch, AlignmentMismatch,
} }
#[cfg(not(target_arch = "spirv"))]
impl core::fmt::Display for PodCastError { impl core::fmt::Display for PodCastError {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { 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) write!(f, "{:?}", self)
} }
} }