Skip to content

Commit

Permalink
Made the TS implementation for hashmap and hashset generic over all h…
Browse files Browse the repository at this point in the history
…ashers
  • Loading branch information
Victor Koenders committed Oct 14, 2023
1 parent c4bee20 commit 35fa135
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ts-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
//! Implement `TS` for `OrderedFloat` from ordered_float
//!
//! - `heapless-impl`
//!
//!
//! Implement `TS` for `Vec` from heapless
//!
//!
Expand Down Expand Up @@ -490,7 +490,7 @@ impl<T: TS> TS for Vec<T> {
}
}

impl<K: TS, V: TS> TS for HashMap<K, V> {
impl<K: TS, V: TS, H> TS for HashMap<K, V, H> {
fn name() -> String {
"Record".to_owned()
}
Expand Down Expand Up @@ -579,7 +579,7 @@ impl<I: TS> TS for RangeInclusive<I> {
}

impl_shadow!(as T: impl<'a, T: TS + ?Sized> TS for &T);
impl_shadow!(as Vec<T>: impl<T: TS> TS for HashSet<T>);
impl_shadow!(as Vec<T>: impl<T: TS, H> TS for HashSet<T, H>);
impl_shadow!(as Vec<T>: impl<T: TS> TS for BTreeSet<T>);
impl_shadow!(as HashMap<K, V>: impl<K: TS, V: TS> TS for BTreeMap<K, V>);
impl_shadow!(as Vec<T>: impl<T: TS, const N: usize> TS for [T; N]);
Expand Down

0 comments on commit 35fa135

Please sign in to comment.