Don't be too broad with trait impl
All checks were successful
Cargo CI / Build and Test (pull_request) Successful in 1m1s
Cargo CI / Lint (pull_request) Successful in 43s

This commit is contained in:
Wojciech Kozlowski 2024-02-09 19:33:42 +01:00
parent 40bcd6b29d
commit 5e14fe0ac6

View File

@ -22,7 +22,7 @@ impl<T: Ord> Merge for Vec<T> {
}
}
impl<K: Hash + PartialEq + Eq, V: Merge> Merge for HashMap<K, V> {
impl<K: Hash + PartialEq + Eq, T: Ord> Merge for HashMap<K, Vec<T>> {
fn merge_in_place(&mut self, mut other: Self) {
for (other_key, other_value) in other.drain() {
if let Some(ref mut value) = self.get_mut(&other_key) {