From 14b72642882c4684a53d8eb88b2752b469658b24 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 13 Aug 2023 21:47:10 +0200 Subject: [PATCH] Implement RewindableFragment for arrays Needed by doctests --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index b2408be..2dd6643 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -150,6 +150,10 @@ pub unsafe trait RewindableFragment {} unsafe impl RewindableFragment for [u8] {} unsafe impl<'a> RewindableFragment for &'a [u8] {} + +unsafe impl 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 {}