• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use {
2     crate::{Arbitrary, Result, Unstructured},
3     std::string::String,
4 };
5 
6 impl<'a> Arbitrary<'a> for String {
arbitrary(u: &mut Unstructured<'a>) -> Result<Self>7     fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
8         <&str as Arbitrary>::arbitrary(u).map(Into::into)
9     }
10 
arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self>11     fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self> {
12         <&str as Arbitrary>::arbitrary_take_rest(u).map(Into::into)
13     }
14 
15     #[inline]
size_hint(depth: usize) -> (usize, Option<usize>)16     fn size_hint(depth: usize) -> (usize, Option<usize>) {
17         <&str as Arbitrary>::size_hint(depth)
18     }
19 }
20