Skip to content

Commit

Permalink
Remove unsound impl Bytes for bool and char
Browse files Browse the repository at this point in the history
`bool` and `char` are not able to have any arbitrary bit-pattern, so they should not implement `Bytes`.

fixes stouset#100
  • Loading branch information
zachs18 authored May 25, 2022
1 parent 79d479a commit cd07f36
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ pub use constant_eq::ConstantEq;
pub use randomizable::Randomizable;
pub use zeroable::Zeroable;

unsafe impl Bytes for bool {}
unsafe impl Bytes for char {}

unsafe impl Bytes for i8 {}
unsafe impl Bytes for i16 {}
unsafe impl Bytes for i32 {}
Expand Down

0 comments on commit cd07f36

Please sign in to comment.