| 1 | #[cfg(feature = "arbitrary")] |
| 2 | #[cfg_attr(docsrs, doc(cfg(feature = "arbitrary")))] |
| 3 | mod impl_arbitraryrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_arbitrary/ { |
| 4 | use craterust-analyzer cargo ordermap 1.2.0 crate/::{OrderMaprust-analyzer cargo ordermap 1.2.0 map/OrderMap#, OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#}; |
| 5 | use arbitraryrust-analyzer cargo arbitrary 1.4.2 crate/::{Arbitraryrust-analyzer cargo arbitrary 1.4.2 Arbitrary#, Resultrust-analyzer cargo arbitrary 1.4.2 error/Result#, Unstructuredrust-analyzer cargo arbitrary 1.4.2 unstructured/Unstructured#}; |
| 6 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/::{BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher#, Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash#}; |
| 7 | use indexmaprust-analyzer cargo indexmap 2.14.0 crate/::{IndexMaprust-analyzer cargo indexmap 2.14.0 map/IndexMap#, IndexSetrust-analyzer cargo indexmap 2.14.0 set/IndexSet#}; |
| 8 | |
| 9 | impl<'a, K, V, S> Arbitraryrust-analyzer cargo arbitrary 1.4.2 Arbitrary#<'a> for OrderMaprust-analyzer cargo ordermap 1.2.0 map/OrderMap#<K, V, S> |
| 10 | where |
| 11 | K: Arbitraryrust-analyzer cargo arbitrary 1.4.2 Arbitrary#<'a> + Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq#, |
| 12 | V: Arbitraryrust-analyzer cargo arbitrary 1.4.2 Arbitrary#<'a>, |
| 13 | S: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#, |
| 14 | { |
| 15 | fn arbitraryrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_arbitrary/impl#[`OrderMap<K, V, S>`][`Arbitrary<'a>`]arbitrary().(u: &mut Unstructuredrust-analyzer cargo arbitrary 1.4.2 unstructured/Unstructured#<'a>) -> Resultrust-analyzer cargo arbitrary 1.4.2 error/Result#<Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_arbitrary/impl#[`OrderMap<K, V, S>`][`Arbitrary<'a>`]> { |
| 16 | IndexMaprust-analyzer cargo indexmap 2.14.0 map/IndexMap#::arbitraryrust-analyzer cargo indexmap 2.14.0 arbitrary/impl_arbitrary/impl#[`IndexMap<K, V, S>`][`Arbitrary<'a>`]arbitrary().(u).maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map().(|inner| Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_arbitrary/impl#[`OrderMap<K, V, S>`][`Arbitrary<'a>`] { innerrust-analyzer cargo ordermap 1.2.0 map/OrderMap#inner. }) |
| 17 | } |
| 18 | |
| 19 | fn arbitrary_take_restrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_arbitrary/impl#[`OrderMap<K, V, S>`][`Arbitrary<'a>`]arbitrary_take_rest().(u: Unstructuredrust-analyzer cargo arbitrary 1.4.2 unstructured/Unstructured#<'a>) -> Resultrust-analyzer cargo arbitrary 1.4.2 error/Result#<Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_arbitrary/impl#[`OrderMap<K, V, S>`][`Arbitrary<'a>`]> { |
| 20 | IndexMaprust-analyzer cargo indexmap 2.14.0 map/IndexMap#::arbitrary_take_restrust-analyzer cargo indexmap 2.14.0 arbitrary/impl_arbitrary/impl#[`IndexMap<K, V, S>`][`Arbitrary<'a>`]arbitrary_take_rest().(u).maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map().(|inner| Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_arbitrary/impl#[`OrderMap<K, V, S>`][`Arbitrary<'a>`] { innerrust-analyzer cargo ordermap 1.2.0 map/OrderMap#inner. }) |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | impl<'a, T, S> Arbitraryrust-analyzer cargo arbitrary 1.4.2 Arbitrary#<'a> for OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S> |
| 25 | where |
| 26 | T: Arbitraryrust-analyzer cargo arbitrary 1.4.2 Arbitrary#<'a> + Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq#, |
| 27 | S: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#, |
| 28 | { |
| 29 | fn arbitraryrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_arbitrary/impl#[`OrderSet<T, S>`][`Arbitrary<'a>`]arbitrary().(u: &mut Unstructuredrust-analyzer cargo arbitrary 1.4.2 unstructured/Unstructured#<'a>) -> Resultrust-analyzer cargo arbitrary 1.4.2 error/Result#<Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_arbitrary/impl#[`OrderSet<T, S>`][`Arbitrary<'a>`]> { |
| 30 | IndexSetrust-analyzer cargo indexmap 2.14.0 set/IndexSet#::arbitraryrust-analyzer cargo indexmap 2.14.0 arbitrary/impl_arbitrary/impl#[`IndexSet<T, S>`][`Arbitrary<'a>`]arbitrary().(u).maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map().(|inner| Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_arbitrary/impl#[`OrderSet<T, S>`][`Arbitrary<'a>`] { innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner. }) |
| 31 | } |
| 32 | |
| 33 | fn arbitrary_take_restrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_arbitrary/impl#[`OrderSet<T, S>`][`Arbitrary<'a>`]arbitrary_take_rest().(u: Unstructuredrust-analyzer cargo arbitrary 1.4.2 unstructured/Unstructured#<'a>) -> Resultrust-analyzer cargo arbitrary 1.4.2 error/Result#<Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_arbitrary/impl#[`OrderSet<T, S>`][`Arbitrary<'a>`]> { |
| 34 | IndexSetrust-analyzer cargo indexmap 2.14.0 set/IndexSet#::arbitrary_take_restrust-analyzer cargo indexmap 2.14.0 arbitrary/impl_arbitrary/impl#[`IndexSet<T, S>`][`Arbitrary<'a>`]arbitrary_take_rest().(u).maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map().(|inner| Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_arbitrary/impl#[`OrderSet<T, S>`][`Arbitrary<'a>`] { innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner. }) |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | #[cfg(feature = "quickcheck")] |
| 40 | #[cfg_attr(docsrs, doc(cfg(feature = "quickcheck")))] |
| 41 | mod impl_quickcheckrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_quickcheck/ { |
| 42 | use craterust-analyzer cargo ordermap 1.2.0 crate/::{OrderMaprust-analyzer cargo ordermap 1.2.0 map/OrderMap#, OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#}; |
| 43 | use allocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc crate/::boxedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/::Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#; |
| 44 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/::{BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher#, Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash#}; |
| 45 | use indexmaprust-analyzer cargo indexmap 2.14.0 crate/::{IndexMaprust-analyzer cargo indexmap 2.14.0 map/IndexMap#, IndexSetrust-analyzer cargo indexmap 2.14.0 set/IndexSet#}; |
| 46 | use quickcheckrust-analyzer cargo quickcheck 1.0.3 crate/::{Arbitraryrust-analyzer cargo quickcheck 1.0.3 arbitrary/Arbitrary#, Genrust-analyzer cargo quickcheck 1.0.3 arbitrary/Gen#}; |
| 47 | |
| 48 | impl<K, V, S> Arbitraryrust-analyzer cargo quickcheck 1.0.3 arbitrary/Arbitrary# for OrderMaprust-analyzer cargo ordermap 1.2.0 map/OrderMap#<K, V, S> |
| 49 | where |
| 50 | K: Arbitraryrust-analyzer cargo quickcheck 1.0.3 arbitrary/Arbitrary# + Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq#, |
| 51 | V: Arbitraryrust-analyzer cargo quickcheck 1.0.3 arbitrary/Arbitrary#, |
| 52 | S: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# + Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone# + 'static, |
| 53 | { |
| 54 | fn arbitraryrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_quickcheck/impl#[`OrderMap<K, V, S>`][Arbitrary]arbitrary().(g: &mut Genrust-analyzer cargo quickcheck 1.0.3 arbitrary/Gen#) -> Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_quickcheck/impl#[`OrderMap<K, V, S>`][Arbitrary] { |
| 55 | Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_quickcheck/impl#[`OrderMap<K, V, S>`][Arbitrary] { |
| 56 | innerrust-analyzer cargo ordermap 1.2.0 map/OrderMap#inner.: IndexMaprust-analyzer cargo indexmap 2.14.0 map/IndexMap#::arbitrary(g), |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | fn shrinkrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_quickcheck/impl#[`OrderMap<K, V, S>`][Arbitrary]shrink().(&self) -> Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_quickcheck/impl#[`OrderMap<K, V, S>`][Arbitrary]>> { |
| 61 | Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(self.innerrust-analyzer cargo ordermap 1.2.0 map/OrderMap#inner..shrink().map(|inner| Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_quickcheck/impl#[`OrderMap<K, V, S>`][Arbitrary] { innerrust-analyzer cargo ordermap 1.2.0 map/OrderMap#inner. })) |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | impl<T, S> Arbitraryrust-analyzer cargo quickcheck 1.0.3 arbitrary/Arbitrary# for OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S> |
| 66 | where |
| 67 | T: Arbitraryrust-analyzer cargo quickcheck 1.0.3 arbitrary/Arbitrary# + Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq#, |
| 68 | S: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# + Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone# + 'static, |
| 69 | { |
| 70 | fn arbitraryrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_quickcheck/impl#[`OrderSet<T, S>`][Arbitrary]arbitrary().(g: &mut Genrust-analyzer cargo quickcheck 1.0.3 arbitrary/Gen#) -> Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_quickcheck/impl#[`OrderSet<T, S>`][Arbitrary] { |
| 71 | Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_quickcheck/impl#[`OrderSet<T, S>`][Arbitrary] { |
| 72 | innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner.: IndexSetrust-analyzer cargo indexmap 2.14.0 set/IndexSet#::arbitrary(g), |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | fn shrinkrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_quickcheck/impl#[`OrderSet<T, S>`][Arbitrary]shrink().(&self) -> Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_quickcheck/impl#[`OrderSet<T, S>`][Arbitrary]>> { |
| 77 | Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..shrink().map(|inner| Selfrust-analyzer cargo ordermap 1.2.0 arbitrary/impl_quickcheck/impl#[`OrderSet<T, S>`][Arbitrary] { innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner. })) |
| 78 | } |
| 79 | } |
| 80 | } |