.cargo/vendor/arbitrary/src/foreign/std/path.rs
raw| 1 | use { |
| 2 | crate::{Arbitrary, Result, Unstructured}, |
| 3 | std::{ffi::OsString, path::PathBuf}, |
| 4 | }; |
| 5 | |
| 6 | impl<'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 | } |