diff --git a/src/lib.rs b/src/lib.rs index e465b11..1591c3d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -249,6 +249,18 @@ impl fmt::Debug for Mult } } +impl Default for MultiMap +where + K1: Eq + Hash + Clone, + K2: Eq + Hash + Clone, +{ + /// Creates an empty `MultiMap` + #[inline] + fn default() -> MultiMap { + MultiMap::new() + } +} + /// An iterator over the entries of a `MultiMap` like in a `HashMap` but with /// values of the form (K2, V) instead of V. /// @@ -336,6 +348,7 @@ impl Iterator for IntoIter { self.base.size_hint() } } + #[macro_export] /// Create a `MultiMap` from a list of key-value tuples ///