| 1 |
//! Parallel iterator types for [`OrderSet`] with [rayon]. |
| 2 |
//! |
| 3 |
//! You will rarely need to interact with this module directly unless you need to name one of the |
| 4 |
//! iterator types. |
| 5 |
|
| 6 |
pub use indexmaprust-analyzer cargo indexmap 2.14.0 crate/::setrust-analyzer cargo indexmap 2.14.0 set/::rayonrust-analyzer cargo indexmap 2.14.0 rayon/set/::{ |
| 7 |
IntoParIterrust-analyzer cargo indexmap 2.14.0 rayon/set/IntoParIter#, ParDifferencerust-analyzer cargo indexmap 2.14.0 rayon/set/ParDifference#, ParDrainrust-analyzer cargo indexmap 2.14.0 rayon/set/ParDrain#, ParIntersectionrust-analyzer cargo indexmap 2.14.0 rayon/set/ParIntersection#, ParIterrust-analyzer cargo indexmap 2.14.0 rayon/set/ParIter#, ParSymmetricDifferencerust-analyzer cargo indexmap 2.14.0 rayon/set/ParSymmetricDifference#, |
| 8 |
ParUnionrust-analyzer cargo indexmap 2.14.0 rayon/set/ParUnion#, |
| 9 |
}; |
| 10 |
|
| 11 |
use superrust-analyzer cargo ordermap 1.2.0 set/::OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#; |
| 12 |
use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core 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#; |
| 13 |
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#}; |
| 14 |
use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::opsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/::RangeBoundsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeBounds#; |
| 15 |
use rayonrust-analyzer cargo rayon 1.11.0 crate/::preluderust-analyzer cargo rayon 1.11.0 prelude/::*; |
| 16 |
|
| 17 |
impl<T, S> IntoParallelIteratorrust-analyzer cargo rayon 1.11.0 iter/IntoParallelIterator# for OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S> |
| 18 |
where |
| 19 |
T: Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#, |
| 20 |
{ |
| 21 |
type Itemrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`][IntoParallelIterator]Item# = T; |
| 22 |
type Iterrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`][IntoParallelIterator]Iter# = IntoParIterrust-analyzer cargo indexmap 2.14.0 rayon/set/IntoParIter#<T>; |
| 23 |
|
| 24 |
fn into_par_iterrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`][IntoParallelIterator]into_par_iter().(self) -> Selfrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`][IntoParallelIterator]::Iterrust-analyzer cargo rayon 1.11.0 iter/IntoParallelIterator#Iter# { |
| 25 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..into_par_iterrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`][IntoParallelIterator]into_par_iter().() |
| 26 |
} |
| 27 |
} |
| 28 |
|
| 29 |
impl<'a, T, S> IntoParallelIteratorrust-analyzer cargo rayon 1.11.0 iter/IntoParallelIterator# for &'a OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S> |
| 30 |
where |
| 31 |
T: Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 32 |
{ |
| 33 |
type Itemrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`&'a OrderSet<T, S>`][IntoParallelIterator]Item# = &'a T; |
| 34 |
type Iterrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`&'a OrderSet<T, S>`][IntoParallelIterator]Iter# = ParIterrust-analyzer cargo indexmap 2.14.0 rayon/set/ParIter#<'a, T>; |
| 35 |
|
| 36 |
fn into_par_iterrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`&'a OrderSet<T, S>`][IntoParallelIterator]into_par_iter().(self) -> Selfrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`&'a OrderSet<T, S>`][IntoParallelIterator]::Iterrust-analyzer cargo rayon 1.11.0 iter/IntoParallelIterator#Iter# { |
| 37 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_iterrust-analyzer cargo rayon 1.11.0 iter/impl#[I][`IntoParallelRefIterator<'data>`]par_iter().() |
| 38 |
} |
| 39 |
} |
| 40 |
|
| 41 |
impl<'a, T, S> ParallelDrainRangerust-analyzer cargo rayon 1.11.0 iter/ParallelDrainRange#<usize> for &'a mut OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S> |
| 42 |
where |
| 43 |
T: Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#, |
| 44 |
{ |
| 45 |
type Itemrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`&'a mut OrderSet<T, S>`][`ParallelDrainRange<usize>`]Item# = T; |
| 46 |
type Iterrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`&'a mut OrderSet<T, S>`][`ParallelDrainRange<usize>`]Iter# = ParDrainrust-analyzer cargo indexmap 2.14.0 rayon/set/ParDrain#<'a, T>; |
| 47 |
|
| 48 |
fn par_drainrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`&'a mut OrderSet<T, S>`][`ParallelDrainRange<usize>`]par_drain().<R: RangeBoundsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeBounds#<usize>>(self, range: R) -> Selfrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`&'a mut OrderSet<T, S>`][`ParallelDrainRange<usize>`]::Iterrust-analyzer cargo rayon 1.11.0 iter/ParallelDrainRange#Iter# { |
| 49 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_drainrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`&'a mut IndexSet<T, S>`][`ParallelDrainRange<usize>`]par_drain().(range) |
| 50 |
} |
| 51 |
} |
| 52 |
|
| 53 |
impl<T, S> OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S> |
| 54 |
where |
| 55 |
T: PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 56 |
{ |
| 57 |
/// Returns `true` if `self` contains all of the same values as `other`, |
| 58 |
/// in the same indexed order, determined in parallel. |
| 59 |
pub fn par_eqrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_eq().<S2>(&self, other: &OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S2>) -> bool |
| 60 |
where |
| 61 |
S2: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 62 |
{ |
| 63 |
self.lenrust-analyzer cargo ordermap 1.2.0 set/impl#[`OrderSet<T, S>`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().other.lenrust-analyzer cargo ordermap 1.2.0 set/impl#[`OrderSet<T, S>`]len().() && self.par_iterrust-analyzer cargo rayon 1.11.0 iter/impl#[I][`IntoParallelRefIterator<'data>`]par_iter().().eqrust-analyzer cargo rayon 1.11.0 iter/IndexedParallelIterator#eq().(other) |
| 64 |
} |
| 65 |
} |
| 66 |
|
| 67 |
/// Parallel iterator methods and other parallel methods. |
| 68 |
/// |
| 69 |
/// The following methods **require crate feature `"rayon"`**. |
| 70 |
/// |
| 71 |
/// See also the `IntoParallelIterator` implementations. |
| 72 |
impl<T, S> OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S> |
| 73 |
where |
| 74 |
T: 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# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 75 |
S: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 76 |
{ |
| 77 |
/// Return a parallel iterator over the values that are in `self` but not `other`. |
| 78 |
/// |
| 79 |
/// While parallel iterators can process items in any order, their relative order |
| 80 |
/// in the `self` set is still preserved for operations like `reduce` and `collect`. |
| 81 |
pub fn par_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_difference().<'a, S2>( |
| 82 |
&'a self, |
| 83 |
other: &'a OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S2>, |
| 84 |
) -> ParDifferencerust-analyzer cargo indexmap 2.14.0 rayon/set/ParDifference#<'a, T, S, S2> |
| 85 |
where |
| 86 |
S2: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 87 |
{ |
| 88 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_differencerust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_difference().(&other.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner.) |
| 89 |
} |
| 90 |
|
| 91 |
/// Return a parallel iterator over the values that are in `self` or `other`, |
| 92 |
/// but not in both. |
| 93 |
/// |
| 94 |
/// While parallel iterators can process items in any order, their relative order |
| 95 |
/// in the sets is still preserved for operations like `reduce` and `collect`. |
| 96 |
/// Values from `self` are produced in their original order, followed by |
| 97 |
/// values from `other` in their original order. |
| 98 |
pub fn par_symmetric_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_symmetric_difference().<'a, S2>( |
| 99 |
&'a self, |
| 100 |
other: &'a OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S2>, |
| 101 |
) -> ParSymmetricDifferencerust-analyzer cargo indexmap 2.14.0 rayon/set/ParSymmetricDifference#<'a, T, S, S2> |
| 102 |
where |
| 103 |
S2: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 104 |
{ |
| 105 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_symmetric_differencerust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_symmetric_difference().(&other.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner.) |
| 106 |
} |
| 107 |
|
| 108 |
/// Return a parallel iterator over the values that are in both `self` and `other`. |
| 109 |
/// |
| 110 |
/// While parallel iterators can process items in any order, their relative order |
| 111 |
/// in the `self` set is still preserved for operations like `reduce` and `collect`. |
| 112 |
pub fn par_intersectionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_intersection().<'a, S2>( |
| 113 |
&'a self, |
| 114 |
other: &'a OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S2>, |
| 115 |
) -> ParIntersectionrust-analyzer cargo indexmap 2.14.0 rayon/set/ParIntersection#<'a, T, S, S2> |
| 116 |
where |
| 117 |
S2: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 118 |
{ |
| 119 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_intersectionrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_intersection().(&other.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner.) |
| 120 |
} |
| 121 |
|
| 122 |
/// Return a parallel iterator over all values that are in `self` or `other`. |
| 123 |
/// |
| 124 |
/// While parallel iterators can process items in any order, their relative order |
| 125 |
/// in the sets is still preserved for operations like `reduce` and `collect`. |
| 126 |
/// Values from `self` are produced in their original order, followed by |
| 127 |
/// values that are unique to `other` in their original order. |
| 128 |
pub fn par_unionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_union().<'a, S2>(&'a self, other: &'a OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S2>) -> ParUnionrust-analyzer cargo indexmap 2.14.0 rayon/set/ParUnion#<'a, T, S, S2> |
| 129 |
where |
| 130 |
S2: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 131 |
{ |
| 132 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_unionrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_union().(&other.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner.) |
| 133 |
} |
| 134 |
|
| 135 |
/// Returns `true` if `self` has no elements in common with `other`, |
| 136 |
/// determined in parallel. |
| 137 |
pub fn par_is_disjointrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_disjoint().<S2>(&self, other: &OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S2>) -> bool |
| 138 |
where |
| 139 |
S2: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 140 |
{ |
| 141 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_is_disjointrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_is_disjoint().(&other.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner.) |
| 142 |
} |
| 143 |
|
| 144 |
/// Returns `true` if all elements of `other` are contained in `self`, |
| 145 |
/// determined in parallel. |
| 146 |
pub fn par_is_supersetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_superset().<S2>(&self, other: &OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S2>) -> bool |
| 147 |
where |
| 148 |
S2: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 149 |
{ |
| 150 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_is_supersetrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_is_superset().(&other.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner.) |
| 151 |
} |
| 152 |
|
| 153 |
/// Returns `true` if all elements of `self` are contained in `other`, |
| 154 |
/// determined in parallel. |
| 155 |
pub fn par_is_subsetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_subset().<S2>(&self, other: &OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S2>) -> bool |
| 156 |
where |
| 157 |
S2: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 158 |
{ |
| 159 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_is_subsetrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_is_subset().(&other.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner.) |
| 160 |
} |
| 161 |
|
| 162 |
/// Returns `true` if `self` contains all of the same values as `other`, |
| 163 |
/// regardless of each set's indexed order, determined in parallel. |
| 164 |
pub fn par_set_eqrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_set_eq().<S2>(&self, other: &OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S2>) -> bool |
| 165 |
where |
| 166 |
S2: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 167 |
{ |
| 168 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_eqrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_eq().(&other.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner.) |
| 169 |
} |
| 170 |
} |
| 171 |
|
| 172 |
/// Parallel sorting methods. |
| 173 |
/// |
| 174 |
/// The following methods **require crate feature `"rayon"`**. |
| 175 |
impl<T, S> OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S> |
| 176 |
where |
| 177 |
T: Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#, |
| 178 |
{ |
| 179 |
/// Sort the set's values in parallel by their default ordering. |
| 180 |
pub fn par_sortrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_sort().(&mut self) |
| 181 |
where |
| 182 |
T: Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#, |
| 183 |
{ |
| 184 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_sortrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_sort().(); |
| 185 |
} |
| 186 |
|
| 187 |
/// Sort the set's values in place and in parallel, using the comparison function `cmp`. |
| 188 |
pub fn par_sort_byrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_sort_by().<F>(&mut self, cmp: F) |
| 189 |
where |
| 190 |
F: Fnrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/function/Fn#(&T, &T) -> Orderingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 191 |
{ |
| 192 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_sort_byrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_sort_by().(cmp); |
| 193 |
} |
| 194 |
|
| 195 |
/// Sort the values of the set in parallel and return a by-value parallel iterator of |
| 196 |
/// the values with the result. |
| 197 |
pub fn par_sorted_byrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_sorted_by().<F>(self, cmp: F) -> IntoParIterrust-analyzer cargo indexmap 2.14.0 rayon/set/IntoParIter#<T> |
| 198 |
where |
| 199 |
F: Fnrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/function/Fn#(&T, &T) -> Orderingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 200 |
{ |
| 201 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_sorted_byrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_sorted_by().(cmp) |
| 202 |
} |
| 203 |
|
| 204 |
/// Sort the set's values in place and in parallel, using a key extraction function. |
| 205 |
pub fn par_sort_by_keyrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_sort_by_key().<K, F>(&mut self, sort_key: F) |
| 206 |
where |
| 207 |
K: Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#, |
| 208 |
F: Fnrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/function/Fn#(&T) -> K + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 209 |
{ |
| 210 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_sort_by_keyrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_sort_by_key().(sort_key) |
| 211 |
} |
| 212 |
|
| 213 |
/// Sort the set's values in parallel by their default ordering. |
| 214 |
pub fn par_sort_unstablerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_sort_unstable().(&mut self) |
| 215 |
where |
| 216 |
T: Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#, |
| 217 |
{ |
| 218 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_sort_unstablerust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_sort_unstable().(); |
| 219 |
} |
| 220 |
|
| 221 |
/// Sort the set's values in place and in parallel, using the comparison function `cmp`. |
| 222 |
pub fn par_sort_unstable_byrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_sort_unstable_by().<F>(&mut self, cmp: F) |
| 223 |
where |
| 224 |
F: Fnrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/function/Fn#(&T, &T) -> Orderingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 225 |
{ |
| 226 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_sort_unstable_byrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_sort_unstable_by().(cmp); |
| 227 |
} |
| 228 |
|
| 229 |
/// Sort the values of the set in parallel and return a by-value parallel iterator of |
| 230 |
/// the values with the result. |
| 231 |
pub fn par_sorted_unstable_byrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_sorted_unstable_by().<F>(self, cmp: F) -> IntoParIterrust-analyzer cargo indexmap 2.14.0 rayon/set/IntoParIter#<T> |
| 232 |
where |
| 233 |
F: Fnrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/function/Fn#(&T, &T) -> Orderingrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ordering# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 234 |
{ |
| 235 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_sorted_unstable_byrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_sorted_unstable_by().(cmp) |
| 236 |
} |
| 237 |
|
| 238 |
/// Sort the set's values in place and in parallel, using a key extraction function. |
| 239 |
pub fn par_sort_unstable_by_keyrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_sort_unstable_by_key().<K, F>(&mut self, sort_key: F) |
| 240 |
where |
| 241 |
K: Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#, |
| 242 |
F: Fnrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/function/Fn#(&T) -> K + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 243 |
{ |
| 244 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_sort_unstable_by_keyrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_sort_unstable_by_key().(sort_key) |
| 245 |
} |
| 246 |
|
| 247 |
/// Sort the set's values in place and in parallel, using a key extraction function. |
| 248 |
pub fn par_sort_by_cached_keyrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_sort_by_cached_key().<K, F>(&mut self, sort_key: F) |
| 249 |
where |
| 250 |
K: Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#, |
| 251 |
F: Fnrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/function/Fn#(&T) -> K + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 252 |
{ |
| 253 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_sort_by_cached_keyrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`]par_sort_by_cached_key().(sort_key); |
| 254 |
} |
| 255 |
} |
| 256 |
|
| 257 |
impl<T, S> FromParallelIteratorrust-analyzer cargo rayon 1.11.0 iter/FromParallelIterator#<T> for OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S> |
| 258 |
where |
| 259 |
T: Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq# + Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#, |
| 260 |
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# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#, |
| 261 |
{ |
| 262 |
fn from_par_iterrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`][`FromParallelIterator<T>`]from_par_iter().<I>(iter: I) -> Selfrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`][`FromParallelIterator<T>`] |
| 263 |
where |
| 264 |
I: IntoParallelIteratorrust-analyzer cargo rayon 1.11.0 iter/IntoParallelIterator#<Itemrust-analyzer cargo rayon 1.11.0 iter/IntoParallelIterator#Item# = T>, |
| 265 |
{ |
| 266 |
Selfrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`][`FromParallelIterator<T>`] { |
| 267 |
innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner.: <_>::from_par_iterrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`][`FromParallelIterator<T>`]from_par_iter().(iter), |
| 268 |
} |
| 269 |
} |
| 270 |
} |
| 271 |
|
| 272 |
impl<T, S> ParallelExtendrust-analyzer cargo rayon 1.11.0 iter/ParallelExtend#<T> for OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S> |
| 273 |
where |
| 274 |
T: Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq# + Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#, |
| 275 |
S: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#, |
| 276 |
{ |
| 277 |
fn par_extendrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`][`ParallelExtend<T>`]par_extend().<I>(&mut self, iter: I) |
| 278 |
where |
| 279 |
I: IntoParallelIteratorrust-analyzer cargo rayon 1.11.0 iter/IntoParallelIterator#<Itemrust-analyzer cargo rayon 1.11.0 iter/IntoParallelIterator#Item# = T>, |
| 280 |
{ |
| 281 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_extendrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`][`ParallelExtend<T>`]par_extend().(iter); |
| 282 |
} |
| 283 |
} |
| 284 |
|
| 285 |
impl<'a, T: 'a, S> ParallelExtendrust-analyzer cargo rayon 1.11.0 iter/ParallelExtend#<&'a T> for OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S> |
| 286 |
where |
| 287 |
T: Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy# + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq# + Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#, |
| 288 |
S: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#, |
| 289 |
{ |
| 290 |
fn par_extendrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`][`ParallelExtend<&'a T>`]par_extend().<I>(&mut self, iter: I) |
| 291 |
where |
| 292 |
I: IntoParallelIteratorrust-analyzer cargo rayon 1.11.0 iter/IntoParallelIterator#<Itemrust-analyzer cargo rayon 1.11.0 iter/IntoParallelIterator#Item# = &'a T>, |
| 293 |
{ |
| 294 |
self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..par_extendrust-analyzer cargo indexmap 2.14.0 rayon/set/impl#[`IndexSet<T, S>`][`ParallelExtend<&'a T>`]par_extend().(iter); |
| 295 |
} |
| 296 |
} |
| 297 |
|
| •298 |
#[cfg(all(test, feature = "std"))] |
| 299 |
mod testsrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/ { |
| 300 |
use superrust-analyzer cargo ordermap 1.2.0 set/rayon/::*; |
| 301 |
use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/::Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#; |
| 302 |
|
| 303 |
#[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 304 |
fn insert_orderrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/insert_order().() { |
| 305 |
let insert = [0, 4, 2, 12, 8, 7, 11, 5, 3, 17, 19, 22, 23]; |
| 306 |
let mut set = OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#::newrust-analyzer cargo ordermap 1.2.0 set/impl#[`OrderSet<T>`]new().(); |
| 307 |
|
| 308 |
for &elt in &insert { |
| 309 |
set.insertrust-analyzer cargo ordermap 1.2.0 set/impl#[`OrderSet<T, S>`]insert().(elt); |
| 310 |
} |
| 311 |
|
| 312 |
assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(set.par_iterrust-analyzer cargo rayon 1.11.0 iter/impl#[I][`IntoParallelRefIterator<'data>`]par_iter().().countrust-analyzer cargo rayon 1.11.0 iter/ParallelIterator#count().(), set.lenrust-analyzer cargo ordermap 1.2.0 set/impl#[`OrderSet<T, S>`]len().()); |
| 313 |
assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(set.par_iterrust-analyzer cargo rayon 1.11.0 iter/impl#[I][`IntoParallelRefIterator<'data>`]par_iter().().countrust-analyzer cargo rayon 1.11.0 iter/ParallelIterator#count().(), insert.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().()); |
| 314 |
insert.par_iterrust-analyzer cargo rayon 1.11.0 iter/impl#[I][`IntoParallelRefIterator<'data>`]par_iter().().ziprust-analyzer cargo rayon 1.11.0 iter/IndexedParallelIterator#zip().(&set).for_eachrust-analyzer cargo rayon 1.11.0 iter/ParallelIterator#for_each().(|(a, b)| { |
| 315 |
assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(a, b); |
| 316 |
}); |
| 317 |
(0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#insert.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().()) |
| 318 |
.into_par_iterrust-analyzer cargo rayon 1.11.0 range/impl#[`Range<T>`][IntoParallelIterator]into_par_iter().() |
| 319 |
.ziprust-analyzer cargo rayon 1.11.0 iter/IndexedParallelIterator#zip().(&set) |
| 320 |
.for_eachrust-analyzer cargo rayon 1.11.0 iter/ParallelIterator#for_each().(|(i, v)| { |
| 321 |
assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(set.get_indexrust-analyzer cargo ordermap 1.2.0 set/impl#[`OrderSet<T, S>`]get_index().(i).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().(), v); |
| 322 |
}); |
| 323 |
} |
| 324 |
|
| 325 |
#[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 326 |
fn partial_eq_and_eqrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/partial_eq_and_eq().() { |
| 327 |
let mut set_a = OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#::newrust-analyzer cargo ordermap 1.2.0 set/impl#[`OrderSet<T>`]new().(); |
| 328 |
set_a.insertrust-analyzer cargo ordermap 1.2.0 set/impl#[`OrderSet<T, S>`]insert().(1); |
| 329 |
set_a.insertrust-analyzer cargo ordermap 1.2.0 set/impl#[`OrderSet<T, S>`]insert().(2); |
| 330 |
let mut set_b = set_a.clonerust-analyzer cargo ordermap 1.2.0 set/impl#[`OrderSet<T, S>`][Clone]clone().(); |
| 331 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set_a.par_eqrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_eq().(&set_b)); |
| 332 |
set_b.swap_removerust-analyzer cargo ordermap 1.2.0 set/impl#[`OrderSet<T, S>`]swap_remove().(&1); |
| 333 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_a.par_eqrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_eq().(&set_b)); |
| 334 |
set_b.insertrust-analyzer cargo ordermap 1.2.0 set/impl#[`OrderSet<T, S>`]insert().(3); |
| 335 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_a.par_eqrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_eq().(&set_b)); |
| 336 |
|
| 337 |
let set_c: OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<_> = set_b.into_par_iterrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`][IntoParallelIterator]into_par_iter().().collectrust-analyzer cargo rayon 1.11.0 iter/ParallelIterator#collect().(); |
| 338 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_a.par_eqrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_eq().(&set_c)); |
| 339 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_c.par_eqrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_eq().(&set_a)); |
| 340 |
} |
| 341 |
|
| 342 |
#[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 343 |
fn extendrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/extend().() { |
| 344 |
let mut set = OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#::newrust-analyzer cargo ordermap 1.2.0 set/impl#[`OrderSet<T>`]new().(); |
| 345 |
set.par_extendrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`][`ParallelExtend<&'a T>`]par_extend().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![&1, &2, &3, &4]); |
| 346 |
set.par_extendrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`][`ParallelExtend<T>`]par_extend().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![5, 6]); |
| 347 |
assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 348 |
set.into_par_iterrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`][IntoParallelIterator]into_par_iter().().collectrust-analyzer cargo rayon 1.11.0 iter/ParallelIterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>(), |
| 349 |
vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![1, 2, 3, 4, 5, 6] |
| 350 |
); |
| 351 |
} |
| 352 |
|
| 353 |
#[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 354 |
fn comparisonsrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/comparisons().() { |
| 355 |
let set_a: OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<_> = (0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#3).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(); |
| 356 |
let set_b: OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<_> = (3..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(); |
| 357 |
let set_c: OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<_> = (0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(); |
| 358 |
let set_d: OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<_> = (3..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#9).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(); |
| 359 |
|
| 360 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_a.par_is_disjointrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_disjoint().(&set_a)); |
| 361 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set_a.par_is_subsetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_subset().(&set_a)); |
| 362 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set_a.par_is_supersetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_superset().(&set_a)); |
| 363 |
|
| 364 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set_a.par_is_disjointrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_disjoint().(&set_b)); |
| 365 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set_b.par_is_disjointrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_disjoint().(&set_a)); |
| 366 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_a.par_is_subsetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_subset().(&set_b)); |
| 367 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_b.par_is_subsetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_subset().(&set_a)); |
| 368 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_a.par_is_supersetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_superset().(&set_b)); |
| 369 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_b.par_is_supersetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_superset().(&set_a)); |
| 370 |
|
| 371 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_a.par_is_disjointrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_disjoint().(&set_c)); |
| 372 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_c.par_is_disjointrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_disjoint().(&set_a)); |
| 373 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set_a.par_is_subsetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_subset().(&set_c)); |
| 374 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_c.par_is_subsetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_subset().(&set_a)); |
| 375 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_a.par_is_supersetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_superset().(&set_c)); |
| 376 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set_c.par_is_supersetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_superset().(&set_a)); |
| 377 |
|
| 378 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_c.par_is_disjointrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_disjoint().(&set_d)); |
| 379 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_d.par_is_disjointrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_disjoint().(&set_c)); |
| 380 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_c.par_is_subsetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_subset().(&set_d)); |
| 381 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_d.par_is_subsetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_subset().(&set_c)); |
| 382 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_c.par_is_supersetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_superset().(&set_d)); |
| 383 |
assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().set_d.par_is_supersetrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_is_superset().(&set_c)); |
| 384 |
} |
| 385 |
|
| 386 |
#[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 387 |
fn iter_comparisonsrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/iter_comparisons().() { |
| 388 |
use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/empty/empty().; |
| 389 |
|
| 390 |
fn checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().<'a, I1, I2>(iter1: I1, iter2: I2) |
| 391 |
where |
| 392 |
I1: ParallelIteratorrust-analyzer cargo rayon 1.11.0 iter/ParallelIterator#<Itemrust-analyzer cargo rayon 1.11.0 iter/ParallelIterator#Item# = &'a i32>, |
| 393 |
I2: 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# = i32>, |
| 394 |
{ |
| 395 |
let v1: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_> = iter1.copiedrust-analyzer cargo rayon 1.11.0 iter/ParallelIterator#copied().().collectrust-analyzer cargo rayon 1.11.0 iter/ParallelIterator#collect().(); |
| 396 |
let v2: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_> = iter2.collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(); |
| 397 |
assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(v1, v2); |
| 398 |
} |
| 399 |
|
| 400 |
let set_a: OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<_> = (0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#3).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(); |
| 401 |
let set_b: OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<_> = (3..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(); |
| 402 |
let set_c: OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<_> = (0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(); |
| 403 |
let set_d: OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<_> = (3..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#9).revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(); |
| 404 |
|
| 405 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_a.par_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_difference().(&set_a), emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/empty/empty().()); |
| 406 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_a.par_symmetric_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_symmetric_difference().(&set_a), emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/empty/empty().()); |
| 407 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_a.par_intersectionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_intersection().(&set_a), 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#3); |
| 408 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_a.par_unionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_union().(&set_a), 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#3); |
| 409 |
|
| 410 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_a.par_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_difference().(&set_b), 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#3); |
| 411 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_b.par_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_difference().(&set_a), 3..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6); |
| 412 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_a.par_symmetric_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_symmetric_difference().(&set_b), 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6); |
| 413 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_b.par_symmetric_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_symmetric_difference().(&set_a), (3..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6).chainrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#chain().(0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#3)); |
| 414 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_a.par_intersectionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_intersection().(&set_b), emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/empty/empty().()); |
| 415 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_b.par_intersectionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_intersection().(&set_a), emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/empty/empty().()); |
| 416 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_a.par_unionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_union().(&set_b), 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6); |
| 417 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_b.par_unionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_union().(&set_a), (3..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6).chainrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#chain().(0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#3)); |
| 418 |
|
| 419 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_a.par_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_difference().(&set_c), emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/empty/empty().()); |
| 420 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_c.par_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_difference().(&set_a), 3..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6); |
| 421 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_a.par_symmetric_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_symmetric_difference().(&set_c), 3..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6); |
| 422 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_c.par_symmetric_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_symmetric_difference().(&set_a), 3..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6); |
| 423 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_a.par_intersectionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_intersection().(&set_c), 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#3); |
| 424 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_c.par_intersectionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_intersection().(&set_a), 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#3); |
| 425 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_a.par_unionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_union().(&set_c), 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6); |
| 426 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_c.par_unionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_union().(&set_a), 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6); |
| 427 |
|
| 428 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_c.par_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_difference().(&set_d), 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#3); |
| 429 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_d.par_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_difference().(&set_c), (6..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#9).revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().()); |
| 430 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().( |
| 431 |
set_c.par_symmetric_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_symmetric_difference().(&set_d), |
| 432 |
(0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#3).chainrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#chain().((6..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#9).revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().()), |
| 433 |
); |
| 434 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().( |
| 435 |
set_d.par_symmetric_differencerust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_symmetric_difference().(&set_c), |
| 436 |
(6..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#9).revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().().chainrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#chain().(0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#3), |
| 437 |
); |
| 438 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_c.par_intersectionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_intersection().(&set_d), 3..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6); |
| 439 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_d.par_intersectionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_intersection().(&set_c), (3..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6).revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().()); |
| 440 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_c.par_unionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_union().(&set_d), (0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6).chainrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#chain().((6..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#9).revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().())); |
| 441 |
checkrust-analyzer cargo ordermap 1.2.0 set/rayon/tests/check().(set_d.par_unionrust-analyzer cargo ordermap 1.2.0 set/rayon/impl#[`OrderSet<T, S>`]par_union().(&set_c), (3..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#9).revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().().chainrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#chain().(0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#3)); |
| 442 |
} |
| 443 |
} |