Sha256: 8ef7a801595763c99a1342eeaa222a08a46e5c5770bc4a167d36cfd933ad9649

Contents?: true

Size: 395 Bytes

Versions: 3

Compression:

Stored size: 395 Bytes

Contents

use {
    crate::{Arbitrary, Result, Unstructured},
    std::{ffi::OsString, path::PathBuf},
};

impl<'a> Arbitrary<'a> for PathBuf {
    fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
        <OsString as Arbitrary>::arbitrary(u).map(From::from)
    }

    #[inline]
    fn size_hint(depth: usize) -> (usize, Option<usize>) {
        <OsString as Arbitrary>::size_hint(depth)
    }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/arbitrary-1.4.1/src/foreign/std/path.rs
wasmtime-28.0.0 ./ext/cargo-vendor/arbitrary-1.4.1/src/foreign/std/path.rs
wasmtime-27.0.0 ./ext/cargo-vendor/arbitrary-1.4.1/src/foreign/std/path.rs