Skip to content

Commit

Permalink
Just gate the Display impl instead (#69)
Browse files Browse the repository at this point in the history
The old version didn't compile (because of the extra semicolon)
  • Loading branch information
DJMcNab authored Jun 13, 2021
1 parent 8c8b0a7 commit 291b2d2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 291b2d2

Please sign in to comment.