| 1 | use craterust-analyzer cargo cc-traits 2.0.0 crate/::{ |
| 2 | Clearrust-analyzer cargo cc-traits 2.0.0 Clear#, Collectionrust-analyzer cargo cc-traits 2.0.0 Collection#, CollectionMutrust-analyzer cargo cc-traits 2.0.0 CollectionMut#, CollectionRefrust-analyzer cargo cc-traits 2.0.0 CollectionRef#, Getrust-analyzer cargo cc-traits 2.0.0 Get#, Insertrust-analyzer cargo cc-traits 2.0.0 Insert#, Iterrust-analyzer cargo cc-traits 2.0.0 Iter#, Lenrust-analyzer cargo cc-traits 2.0.0 Len#, Removerust-analyzer cargo cc-traits 2.0.0 Remove#, |
| 3 | SimpleCollectionMutrust-analyzer cargo cc-traits 2.0.0 SimpleCollectionMut#, SimpleCollectionRefrust-analyzer cargo cc-traits 2.0.0 SimpleCollectionRef#, |
| 4 | }; |
| 5 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::{borrowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/::Borrowrust-analyzer cargo core https://github.com/rust-lang/rust/library/core borrow/Borrow#, collectionsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/::HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#, hashrust-analyzer cargo std https://github.com/rust-lang/rust/library/std hash/::Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash#}; |
| 6 | |
| 7 | impl<T> Collectionrust-analyzer cargo cc-traits 2.0.0 Collection# for HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<T> { |
| 8 | type Itemrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][Collection]Item# = T; |
| 9 | } |
| 10 | |
| 11 | impl<T> CollectionRefrust-analyzer cargo cc-traits 2.0.0 CollectionRef# for HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<T> { |
| 12 | type ItemRefrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][CollectionRef]ItemRef#<'a> = &'a T where Selfrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][CollectionRef]: 'a; |
| 13 | |
| 14 | craterust-analyzer cargo cc-traits 2.0.0 crate/::covariant_item_refrust-analyzer cargo cc-traits 2.0.0 macros/covariant_item_ref!!(); |
| 15 | } |
| 16 | |
| 17 | impl<T> CollectionMutrust-analyzer cargo cc-traits 2.0.0 CollectionMut# for HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<T> { |
| 18 | type ItemMutrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][CollectionMut]ItemMut#<'a> = &'a mut T where Selfrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][CollectionMut]: 'a; |
| 19 | |
| 20 | craterust-analyzer cargo cc-traits 2.0.0 crate/::covariant_item_mutrust-analyzer cargo cc-traits 2.0.0 macros/covariant_item_mut!!(); |
| 21 | } |
| 22 | |
| 23 | impl<T> SimpleCollectionRefrust-analyzer cargo cc-traits 2.0.0 SimpleCollectionRef# for HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<T> { |
| 24 | craterust-analyzer cargo cc-traits 2.0.0 crate/::simple_collection_refrust-analyzer cargo cc-traits 2.0.0 macros/simple_collection_ref!!(); |
| 25 | } |
| 26 | |
| 27 | impl<T> SimpleCollectionMutrust-analyzer cargo cc-traits 2.0.0 SimpleCollectionMut# for HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<T> { |
| 28 | craterust-analyzer cargo cc-traits 2.0.0 crate/::simple_collection_mutrust-analyzer cargo cc-traits 2.0.0 macros/simple_collection_mut!!(); |
| 29 | } |
| 30 | |
| 31 | impl<T> Lenrust-analyzer cargo cc-traits 2.0.0 Len# for HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<T> { |
| 32 | #[inline(always)] |
| 33 | fn lenrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][Len]len().(&self) -> usize { |
| 34 | self.lenrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]len().() |
| 35 | } |
| 36 | |
| 37 | #[inline(always)] |
| 38 | fn is_emptyrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][Len]is_empty().(&self) -> bool { |
| 39 | self.is_emptyrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]is_empty().() |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | impl<'a, Q, 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#> Getrust-analyzer cargo cc-traits 2.0.0 Get#<&'a Q> for HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<T> |
| 44 | where |
| 45 | T: Borrowrust-analyzer cargo core https://github.com/rust-lang/rust/library/core borrow/Borrow#<Q>, |
| 46 | Q: 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# + ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#, |
| 47 | { |
| 48 | fn getrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][`Get<&'a Q>`]get().(&self, value: &'a Q) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&T> { |
| 49 | self.getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]get().(value) |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | impl<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#> Insertrust-analyzer cargo cc-traits 2.0.0 Insert# for HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<T> { |
| 54 | type Outputrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][Insert]Output# = bool; |
| 55 | |
| 56 | #[inline(always)] |
| 57 | fn insertrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][Insert]insert().(&mut self, t: T) -> bool { |
| 58 | self.insertrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]insert().(t) |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | impl<'a, Q, 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#> Removerust-analyzer cargo cc-traits 2.0.0 Remove#<&'a Q> for HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<T> |
| 63 | where |
| 64 | T: Borrowrust-analyzer cargo core https://github.com/rust-lang/rust/library/core borrow/Borrow#<Q>, |
| 65 | Q: 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# + ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#, |
| 66 | { |
| 67 | #[inline(always)] |
| 68 | fn removerust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][`Remove<&'a Q>`]remove().(&mut self, t: &'a Q) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<T> { |
| 69 | self.takerust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]take().(t) |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | impl<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#> Clearrust-analyzer cargo cc-traits 2.0.0 Clear# for HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<T> { |
| 74 | #[inline(always)] |
| 75 | fn clearrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][Clear]clear().(&mut self) { |
| 76 | self.clearrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]clear().() |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | impl<T> Iterrust-analyzer cargo cc-traits 2.0.0 Iter# for HashSetrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/HashSet#<T> { |
| 81 | type Iterrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][Iter]Iter#<'a> = 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/::hash_setrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash_set/::Iterrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/Iter#<'a, T> where Selfrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][Iter]: 'a; |
| 82 | |
| 83 | #[inline(always)] |
| 84 | fn iterrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][Iter]iter().(&self) -> Selfrust-analyzer cargo cc-traits 2.0.0 impls/std/hashset/impl#[`HashSet<T>`][Iter]::Iterrust-analyzer cargo cc-traits 2.0.0 Iter#Iter#<'_> { |
| 85 | self.iterrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]iter().() |
| 86 | } |
| 87 | } |