Skip to content

Commit

Permalink
Implement RewindableFragment for arrays
Browse files Browse the repository at this point in the history
Needed by doctests
  • Loading branch information
progval committed Aug 13, 2023
1 parent e50a59b commit 14b7264
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ pub unsafe trait RewindableFragment {}

unsafe impl RewindableFragment for [u8] {}
unsafe impl<'a> RewindableFragment for &'a [u8] {}

unsafe impl<const N: usize> RewindableFragment for [u8; N] {}
unsafe impl<'a, const N: usize> RewindableFragment for &'a [u8; N] {}

unsafe impl RewindableFragment for str {}
unsafe impl<'a> RewindableFragment for &'a str {}

Expand Down

0 comments on commit 14b7264

Please sign in to comment.