• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use {
2     crate::{Arbitrary, Result, Unstructured},
3     std::ffi::OsString,
4 };
5 
6 impl<'a> Arbitrary<'a> for OsString {
arbitrary(u: &mut Unstructured<'a>) -> Result<Self>7     fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
8         <String as Arbitrary>::arbitrary(u).map(From::from)
9     }
10 
11     #[inline]
size_hint(depth: usize) -> (usize, Option<usize>)12     fn size_hint(depth: usize) -> (usize, Option<usize>) {
13         <String as Arbitrary>::size_hint(depth)
14     }
15 }
16 
17 // impl Arbitrary for Box<OsStr> {
18 //     fn arbitrary(u: &mut Unstructured<'_>) -> Result<Self> {
19 //         <OsString as Arbitrary>::arbitrary(u).map(|x| x.into_boxed_osstr())
20 //
21 //     }
22 // }
23