Sha256: 0821db085c8303f8f9e4a316a6dbb5529330488ed06c19284a22a6ef72313270

Contents?: true

Size: 498 Bytes

Versions: 3

Compression:

Stored size: 498 Bytes

Contents

use {
    crate::{Arbitrary, Result, Unstructured},
    std::collections::vec_deque::VecDeque,
};

impl<'a, A> Arbitrary<'a> for VecDeque<A>
where
    A: Arbitrary<'a>,
{
    fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
        u.arbitrary_iter()?.collect()
    }

    fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self> {
        u.arbitrary_take_rest_iter()?.collect()
    }

    #[inline]
    fn size_hint(_depth: usize) -> (usize, Option<usize>) {
        (0, None)
    }
}

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/alloc/collections/vec_deque.rs
wasmtime-28.0.0 ./ext/cargo-vendor/arbitrary-1.4.1/src/foreign/alloc/collections/vec_deque.rs
wasmtime-27.0.0 ./ext/cargo-vendor/arbitrary-1.4.1/src/foreign/alloc/collections/vec_deque.rs