arbitrary/foreign/std/ffi/os_str.rs
use {
crate::{Arbitrary, Result, Unstructured},
std::ffi::OsString,
};
impl<'a> Arbitrary<'a> for OsString {
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
<String as Arbitrary>::arbitrary(u).map(From::from)
}
#[inline]
fn size_hint(depth: usize) -> (usize, Option<usize>) {
<String as Arbitrary>::size_hint(depth)
}
}
// impl Arbitrary for Box<OsStr> {
// fn arbitrary(u: &mut Unstructured<'_>) -> Result<Self> {
// <OsString as Arbitrary>::arbitrary(u).map(|x| x.into_boxed_osstr())
//
// }
// }