Debian Codegraph @

src/test.rs

raw symbols SCIP
1 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::collectionsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/::BTreeSetrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/BTreeSet#;
2
3 use craterust-analyzer cargo binary-merge 0.1.2 crate/::{MergeOperationrust-analyzer cargo binary-merge 0.1.2 MergeOperation#, MergeStaterust-analyzer cargo binary-merge 0.1.2 MergeState#};
4 use proptestrust-analyzer cargo proptest 1.11.0 crate/::preluderust-analyzer cargo proptest 1.11.0 prelude/::*;
5
6 struct VecMergeStaterust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#<'a, T> {
7 arust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#a.: stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/::Iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/Iter#<'a, T>,
8 brust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#b.: stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/::Iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/Iter#<'a, T>,
9 rrust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#r.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<T>,
10 }
11
12 impl<'a, T> MergeStaterust-analyzer cargo binary-merge 0.1.2 MergeState# for VecMergeStaterust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#<'a, T> {
13 type Arust-analyzer cargo binary-merge 0.1.2 test/impl#[`VecMergeState<'a, T>`][MergeState]A# = T;
14
15 type Brust-analyzer cargo binary-merge 0.1.2 test/impl#[`VecMergeState<'a, T>`][MergeState]B# = T;
16
17 fn a_slicerust-analyzer cargo binary-merge 0.1.2 test/impl#[`VecMergeState<'a, T>`][MergeState]a_slice().(&self) -> &[Selfrust-analyzer cargo binary-merge 0.1.2 test/impl#[`VecMergeState<'a, T>`][MergeState]::Arust-analyzer cargo binary-merge 0.1.2 MergeState#A#] {
18 self.arust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#a..as_slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`]as_slice().()
19 }
20
21 fn b_slicerust-analyzer cargo binary-merge 0.1.2 test/impl#[`VecMergeState<'a, T>`][MergeState]b_slice().(&self) -> &[Selfrust-analyzer cargo binary-merge 0.1.2 test/impl#[`VecMergeState<'a, T>`][MergeState]::Brust-analyzer cargo binary-merge 0.1.2 MergeState#B#] {
22 self.brust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#b..as_slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`]as_slice().()
23 }
24 }
25
26 struct BoolMergeStaterust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#<'a, T> {
27 arust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#a.: stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/::Iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/Iter#<'a, T>,
28 brust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#b.: stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/::Iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/Iter#<'a, T>,
29 rrust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#r.: bool,
30 }
31
32 impl<'a, T> MergeStaterust-analyzer cargo binary-merge 0.1.2 MergeState# for BoolMergeStaterust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#<'a, T> {
33 type Arust-analyzer cargo binary-merge 0.1.2 test/impl#[`BoolMergeState<'a, T>`][MergeState]A# = T;
34
35 type Brust-analyzer cargo binary-merge 0.1.2 test/impl#[`BoolMergeState<'a, T>`][MergeState]B# = T;
36
37 fn a_slicerust-analyzer cargo binary-merge 0.1.2 test/impl#[`BoolMergeState<'a, T>`][MergeState]a_slice().(&self) -> &[Selfrust-analyzer cargo binary-merge 0.1.2 test/impl#[`BoolMergeState<'a, T>`][MergeState]::Arust-analyzer cargo binary-merge 0.1.2 MergeState#A#] {
38 self.arust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#a..as_slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`]as_slice().()
39 }
40
41 fn b_slicerust-analyzer cargo binary-merge 0.1.2 test/impl#[`BoolMergeState<'a, T>`][MergeState]b_slice().(&self) -> &[Selfrust-analyzer cargo binary-merge 0.1.2 test/impl#[`BoolMergeState<'a, T>`][MergeState]::Brust-analyzer cargo binary-merge 0.1.2 MergeState#B#] {
42 self.brust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#b..as_slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`]as_slice().()
43 }
44 }
45
46 struct Unionrust-analyzer cargo binary-merge 0.1.2 test/Union#;
47
48 impl<'a, T: Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord# + Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#> MergeOperationrust-analyzer cargo binary-merge 0.1.2 MergeOperation#<VecMergeStaterust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#<'a, T>> for Unionrust-analyzer cargo binary-merge 0.1.2 test/Union# {
49 fn from_arust-analyzer cargo binary-merge 0.1.2 test/impl#[Union][`MergeOperation<VecMergeState<'a, T>>`]from_a().(&self, m: &mut VecMergeStaterust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#<'a, T>, n: usize) -> bool {
50 m.rrust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#r..extendrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Extend<T>`]extend().((&mut m.arust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#a.).clonedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#cloned().().takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().(n));
51 true
52 }
53
54 fn from_brust-analyzer cargo binary-merge 0.1.2 test/impl#[Union][`MergeOperation<VecMergeState<'a, T>>`]from_b().(&self, m: &mut VecMergeStaterust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#<'a, T>, n: usize) -> bool {
55 m.rrust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#r..extendrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Extend<T>`]extend().((&mut m.brust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#b.).clonedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#cloned().().takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().(n));
56 true
57 }
58
59 fn collisionrust-analyzer cargo binary-merge 0.1.2 test/impl#[Union][`MergeOperation<VecMergeState<'a, T>>`]collision().(&self, m: &mut VecMergeStaterust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#<'a, T>) -> bool {
60 m.rrust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#r..extendrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Extend<T>`]extend().((&mut m.arust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#a.).clonedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#cloned().().takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().(1));
61 m.brust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#b..nextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`][Iterator]next().();
62 true
63 }
64
65 fn cmprust-analyzer cargo binary-merge 0.1.2 test/impl#[Union][`MergeOperation<VecMergeState<'a, T>>`]cmp().(&self, a: &T, b: &T) -> stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/::Orderingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering# {
66 a.cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#cmp().(b)
67 }
68 }
69
70 struct Intersectionrust-analyzer cargo binary-merge 0.1.2 test/Intersection#;
71
72 impl<'a, T: Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord# + Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#> MergeOperationrust-analyzer cargo binary-merge 0.1.2 MergeOperation#<VecMergeStaterust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#<'a, T>> for Intersectionrust-analyzer cargo binary-merge 0.1.2 test/Intersection# {
73 fn from_arust-analyzer cargo binary-merge 0.1.2 test/impl#[Intersection][`MergeOperation<VecMergeState<'a, T>>`]from_a().(&self, m: &mut VecMergeStaterust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#<'a, T>, n: usize) -> bool {
74 (&mut m.arust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#a.).takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().(n).for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/adapters/take/impl#[`Take<I>`][Iterator]for_each().(droprust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/drop().);
75 true
76 }
77
78 fn from_brust-analyzer cargo binary-merge 0.1.2 test/impl#[Intersection][`MergeOperation<VecMergeState<'a, T>>`]from_b().(&self, m: &mut VecMergeStaterust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#<'a, T>, n: usize) -> bool {
79 (&mut m.brust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#b.).takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().(n).for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/adapters/take/impl#[`Take<I>`][Iterator]for_each().(droprust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/drop().);
80 true
81 }
82
83 fn collisionrust-analyzer cargo binary-merge 0.1.2 test/impl#[Intersection][`MergeOperation<VecMergeState<'a, T>>`]collision().(&self, m: &mut VecMergeStaterust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#<'a, T>) -> bool {
84 m.rrust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#r..extendrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Extend<T>`]extend().((&mut m.arust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#a.).clonedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#cloned().().takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().(1));
85 m.brust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#b..nextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`][Iterator]next().();
86 true
87 }
88
89 fn cmprust-analyzer cargo binary-merge 0.1.2 test/impl#[Intersection][`MergeOperation<VecMergeState<'a, T>>`]cmp().(&self, a: &T, b: &T) -> stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/::Orderingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering# {
90 a.cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#cmp().(b)
91 }
92 }
93
94 struct Intersectsrust-analyzer cargo binary-merge 0.1.2 test/Intersects#;
95
96 impl<'a, T: Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord# + Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#> MergeOperationrust-analyzer cargo binary-merge 0.1.2 MergeOperation#<BoolMergeStaterust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#<'a, T>> for Intersectsrust-analyzer cargo binary-merge 0.1.2 test/Intersects# {
97 fn from_arust-analyzer cargo binary-merge 0.1.2 test/impl#[Intersects][`MergeOperation<BoolMergeState<'a, T>>`]from_a().(&self, m: &mut BoolMergeStaterust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#<'a, T>, n: usize) -> bool {
98 (&mut m.arust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#a.).takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().(n).for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/adapters/take/impl#[`Take<I>`][Iterator]for_each().(droprust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/drop().);
99 true
100 }
101
102 fn from_brust-analyzer cargo binary-merge 0.1.2 test/impl#[Intersects][`MergeOperation<BoolMergeState<'a, T>>`]from_b().(&self, m: &mut BoolMergeStaterust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#<'a, T>, n: usize) -> bool {
103 (&mut m.brust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#b.).takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().(n).for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/adapters/take/impl#[`Take<I>`][Iterator]for_each().(droprust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/drop().);
104 true
105 }
106
107 fn collisionrust-analyzer cargo binary-merge 0.1.2 test/impl#[Intersects][`MergeOperation<BoolMergeState<'a, T>>`]collision().(&self, m: &mut BoolMergeStaterust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#<'a, T>) -> bool {
108 m.rrust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#r. = true;
109 false
110 }
111
112 fn cmprust-analyzer cargo binary-merge 0.1.2 test/impl#[Intersects][`MergeOperation<BoolMergeState<'a, T>>`]cmp().(&self, a: &T, b: &T) -> stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/::Orderingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering# {
113 a.cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#cmp().(b)
114 }
115 }
116
117 fn arb_sorted_vecrust-analyzer cargo binary-merge 0.1.2 test/arb_sorted_vec().() -> impl Strategyrust-analyzer cargo proptest 1.11.0 strategy/traits/Strategy#<Valuerust-analyzer cargo proptest 1.11.0 strategy/traits/Strategy#Value# = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>> {
118 anyrust-analyzer cargo proptest 1.11.0 arbitrary/traits/any().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>>().prop_maprust-analyzer cargo proptest 1.11.0 strategy/traits/Strategy#prop_map().(|mut v| {
119 v.sort_unstablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]sort_unstable().();
120 v.deduprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]dedup().();
121 v
122 })
123 }
124
125 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
126 fn smokerust-analyzer cargo binary-merge 0.1.2 test/smoke().() {
127 let a = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![1, 2, 3, 4];
128 let b = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![4, 5, 6, 7];
129 let mut s = VecMergeStaterust-analyzer cargo binary-merge 0.1.2 test/VecMergeState# {
130 arust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#a.: a.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().(),
131 brust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#b.: b.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().(),
132 rrust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#r.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`][Default]default().(),
133 };
134 Unionrust-analyzer cargo binary-merge 0.1.2 test/Union#.mergerust-analyzer cargo binary-merge 0.1.2 MergeOperation#merge().(&mut s);
135 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(s.rrust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#r., vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![1, 2, 3, 4, 5, 6, 7]);
136 let mut s = VecMergeStaterust-analyzer cargo binary-merge 0.1.2 test/VecMergeState# {
137 arust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#a.: a.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().(),
138 brust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#b.: b.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().(),
139 rrust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#r.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`][Default]default().(),
140 };
141 Intersectionrust-analyzer cargo binary-merge 0.1.2 test/Intersection#.mergerust-analyzer cargo binary-merge 0.1.2 MergeOperation#merge().(&mut s);
142 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(s.rrust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#r., vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![4]);
143 let mut s = BoolMergeStaterust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState# {
144 arust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#a.: a.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().(),
145 brust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#b.: b.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().(),
146 rrust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#r.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/impl#[bool][Default]default().(),
147 };
148 Intersectsrust-analyzer cargo binary-merge 0.1.2 test/Intersects#.mergerust-analyzer cargo binary-merge 0.1.2 MergeOperation#merge().(&mut s);
149 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(s.rrust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#r.);
150 }
151
152 fn std_set_unionrust-analyzer cargo binary-merge 0.1.2 test/std_set_union().(a: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>, b: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>) -> Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8> {
153 let mut r = BTreeSetrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/BTreeSet#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/impl#[`BTreeSet<T>`]new().();
154 r.extendrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/impl#[`BTreeSet<T, A>`][`Extend<T>`]extend().(a.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().());
155 r.extendrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/impl#[`BTreeSet<T, A>`][`Extend<T>`]extend().(b.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().());
156 r.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/impl#[`BTreeSet<T, A>`][IntoIterator]into_iter().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().()
157 }
158
159 fn std_set_intersectionrust-analyzer cargo binary-merge 0.1.2 test/std_set_intersection().(a: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>, b: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>) -> Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8> {
160 let a: BTreeSetrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/BTreeSet#<u8> = a.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
161 let b: BTreeSetrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/BTreeSet#<u8> = b.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
162 a.intersectionrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/impl#[`BTreeSet<T, A>`]intersection().(&b).clonedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#cloned().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().()
163 }
164
165 fn std_set_intersectsrust-analyzer cargo binary-merge 0.1.2 test/std_set_intersects().(a: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>, b: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>) -> bool {
166 let a: BTreeSetrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/BTreeSet#<u8> = a.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
167 let b: BTreeSetrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/BTreeSet#<u8> = b.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
168 a.intersectionrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/impl#[`BTreeSet<T, A>`]intersection().(&b).nextrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/set/impl#[`Intersection<'a, T, A>`][Iterator]next().().is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().()
169 }
170
171 proptestrust-analyzer cargo proptest 1.11.0 sugar/proptest!! {
172 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
173 fn unionrust-analyzer cargo binary-merge 0.1.2 test/union().(
174 a in arb_sorted_vecrust-analyzer cargo binary-merge 0.1.2 test/arb_sorted_vec().(),
175 b in arb_sorted_vecrust-analyzer cargo binary-merge 0.1.2 test/arb_sorted_vec().(),
176 ) {
177 let mut s = VecMergeStaterust-analyzer cargo binary-merge 0.1.2 test/VecMergeState# {
178 arust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#a.: a.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().(),
179 brust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#b.: b.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().(),
180 rrust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#r.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`][Default]default().(),
181 };
182 Unionrust-analyzer cargo binary-merge 0.1.2 test/Union#.mergerust-analyzer cargo binary-merge 0.1.2 MergeOperation#merge().(&mut s);
183 prop_assert_eqrust-analyzer cargo proptest 1.11.0 sugar/prop_assert_eq!!(s.rrust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#r., std_set_unionrust-analyzer cargo binary-merge 0.1.2 test/std_set_union().(a, b));
184 }
185
186 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
187 fn intersectionrust-analyzer cargo binary-merge 0.1.2 test/intersection().(
188 a in arb_sorted_vecrust-analyzer cargo binary-merge 0.1.2 test/arb_sorted_vec().(),
189 b in arb_sorted_vecrust-analyzer cargo binary-merge 0.1.2 test/arb_sorted_vec().(),
190 ) {
191 let mut s = VecMergeStaterust-analyzer cargo binary-merge 0.1.2 test/VecMergeState# {
192 arust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#a.: a.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().(),
193 brust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#b.: b.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().(),
194 rrust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#r.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`][Default]default().(),
195 };
196 Intersectionrust-analyzer cargo binary-merge 0.1.2 test/Intersection#.mergerust-analyzer cargo binary-merge 0.1.2 MergeOperation#merge().(&mut s);
197 prop_assert_eqrust-analyzer cargo proptest 1.11.0 sugar/prop_assert_eq!!(s.rrust-analyzer cargo binary-merge 0.1.2 test/VecMergeState#r., std_set_intersectionrust-analyzer cargo binary-merge 0.1.2 test/std_set_intersection().(a, b));
198 }
199
200 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
201 fn intersectsrust-analyzer cargo binary-merge 0.1.2 test/intersects().(
202 a in arb_sorted_vecrust-analyzer cargo binary-merge 0.1.2 test/arb_sorted_vec().(),
203 b in arb_sorted_vecrust-analyzer cargo binary-merge 0.1.2 test/arb_sorted_vec().(),
204 ) {
205 let mut s = BoolMergeStaterust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState# {
206 arust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#a.: a.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().(),
207 brust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#b.: b.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().(),
208 rrust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#r.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/impl#[bool][Default]default().(),
209 };
210 Intersectsrust-analyzer cargo binary-merge 0.1.2 test/Intersects#.mergerust-analyzer cargo binary-merge 0.1.2 MergeOperation#merge().(&mut s);
211 prop_assert_eqrust-analyzer cargo proptest 1.11.0 sugar/prop_assert_eq!!(s.rrust-analyzer cargo binary-merge 0.1.2 test/BoolMergeState#r., std_set_intersectsrust-analyzer cargo binary-merge 0.1.2 test/std_set_intersects().(a, b));
212 }
213 }