Skip to content

Commit

Permalink
Merge pull request #46 from kdy1/master
Browse files Browse the repository at this point in the history
Implement Default for DashMap<K, V, S>.
  • Loading branch information
xacrimon authored Jan 30, 2020
2 parents ba749e2 + f379d8d commit 0b2cbf7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ impl<K: Eq + Hash + Clone, V: Clone, S: Clone> Clone for DashMap<K, V, S> {
}
}

impl<K, V> Default for DashMap<K, V>
impl<K, V, S> Default for DashMap<K, V, S>
where
K: Eq + Hash,
S: Default,
{
fn default() -> Self {
Self::new()
Self::with_hasher(Default::default())
}
}

Expand Down

0 comments on commit 0b2cbf7

Please sign in to comment.