smol-bytes 0.1.5

High-performance, clone-efficient byte buffers optimized for small data.
Documentation
1
2
3
4
5
6
7
8
9
10
use super::{ImmutableStorage, RawBytes};

impl<'a, S> arbitrary::Arbitrary<'a> for RawBytes<S>
where
  Self: ImmutableStorage,
{
  fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> Result<Self, arbitrary::Error> {
    <&[u8]>::arbitrary(u).map(Self::from)
  }
}