Skip to content

Commit

Permalink
Implement TransparentWrapper for [T; 1], (T,), and (T, ())
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAdk committed Aug 18, 2024
1 parent 3c42ba7 commit b54038f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/transparent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,6 @@ pub unsafe trait TransparentWrapper<Inner: ?Sized> {
}

unsafe impl<T> TransparentWrapper<T> for core::num::Wrapping<T> {}
unsafe impl<T> TransparentWrapper<T> for [T; 1] {}
unsafe impl<T> TransparentWrapper<T> for (T,) {}
unsafe impl<T> TransparentWrapper<T> for (T, ()) {}

0 comments on commit b54038f

Please sign in to comment.