Skip to content

Commit

Permalink
Merge pull request #396 from zeenix/type-for-hashset
Browse files Browse the repository at this point in the history
✨ zv: Implement Type for std::collections::HashSet
  • Loading branch information
zeenix authored Jul 2, 2023
2 parents 6af95ac + 1b0f07d commit 1ab98ad
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions zvariant/src/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,17 @@ macro_rules! array_type {
array_type!([T]);
array_type!(Vec<T>);

impl<T, S> Type for std::collections::HashSet<T, S>
where
T: Type + Eq + Hash,
S: BuildHasher,
{
#[inline]
fn signature() -> Signature<'static> {
<[T]>::signature()
}
}

#[cfg(feature = "arrayvec")]
impl<T, const CAP: usize> Type for arrayvec::ArrayVec<T, CAP>
where
Expand Down

0 comments on commit 1ab98ad

Please sign in to comment.