arbitrary/foreign/std/
path.rs

1use {
2    crate::{Arbitrary, Result, Unstructured},
3    std::{ffi::OsString, path::PathBuf},
4};
5
6impl<'a> Arbitrary<'a> for PathBuf {
7    fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
8        <OsString as Arbitrary>::arbitrary(u).map(From::from)
9    }
10
11    #[inline]
12    fn size_hint(depth: usize) -> (usize, Option<usize>) {
13        <OsString as Arbitrary>::size_hint(depth)
14    }
15}