Skip to content

Commit

Permalink
Fix replaced bytecheck type
Browse files Browse the repository at this point in the history
  • Loading branch information
djkoloski committed Jun 21, 2021
1 parent 247e1f6 commit 6817ecc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/impl_validation.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
macro_rules! impl_validation {
(@always $endian:ident<$ne:ty>) => {
impl<C: ?Sized> CheckBytes<C> for $endian<$ne> {
type Error = Unreachable;
type Error = Infallible;

#[inline]
unsafe fn check_bytes<'a>(
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ mod impl_traits;
mod impl_validation;

#[cfg(feature = "validation")]
use bytecheck::{CharCheckError, CheckBytes, NonZeroCheckError, Unreachable};
use core::convert::Infallible;
#[cfg(has_atomics)]
use core::sync::atomic::{AtomicI16, AtomicI32, AtomicU16, AtomicU32, Ordering};
#[cfg(has_atomics_64)]
Expand All @@ -75,6 +75,8 @@ use core::{
NonZeroU64,
},
};
#[cfg(feature = "validation")]
use bytecheck::{CharCheckError, CheckBytes, NonZeroCheckError};

/// A wrapper for native-endian types.
///
Expand Down

0 comments on commit 6817ecc

Please sign in to comment.