Remove trait bounds from Map/Set JsonSchema impls.

They are unnecessary as we never create/use any instances of these types
This commit is contained in:
Graham Esau 2019-12-27 21:18:18 +00:00
parent 4b9578ec2b
commit 8d0ccc89db
3 changed files with 9 additions and 5 deletions

View file

@ -1,5 +1,9 @@
# Changelog
## next
### Changed
- Remove trait bounds from Map/Set JsonSchema impls. They are unnecessary as we never create/use any instances of these types.
## [0.6.3] - 2019-12-27
- No actual code changes - this version was just published to fix broken README on crates.io

View file

@ -39,8 +39,8 @@ macro_rules! map_impl {
};
}
map_impl!(<K: Ord, V> JsonSchema for std::collections::BTreeMap<K, V>);
map_impl!(<K: Eq + core::hash::Hash, V, H: core::hash::BuildHasher> JsonSchema for std::collections::HashMap<K, V, H>);
map_impl!(<K, V> JsonSchema for std::collections::BTreeMap<K, V>);
map_impl!(<K, V, H> JsonSchema for std::collections::HashMap<K, V, H>);
#[cfg(test)]
mod tests {

View file

@ -29,9 +29,9 @@ macro_rules! seq_impl {
};
}
seq_impl!(<T: Ord> JsonSchema for std::collections::BinaryHeap<T>);
seq_impl!(<T: Ord> JsonSchema for std::collections::BTreeSet<T>);
seq_impl!(<T: Eq + core::hash::Hash, H: core::hash::BuildHasher> JsonSchema for std::collections::HashSet<T, H>);
seq_impl!(<T> JsonSchema for std::collections::BinaryHeap<T>);
seq_impl!(<T> JsonSchema for std::collections::BTreeSet<T>);
seq_impl!(<T, H> JsonSchema for std::collections::HashSet<T, H>);
seq_impl!(<T> JsonSchema for std::collections::LinkedList<T>);
seq_impl!(<T> JsonSchema for Vec<T>);
seq_impl!(<T> JsonSchema for std::collections::VecDeque<T>);