Skip to content

Commit

Permalink
Implement Extend for value::Map
Browse files Browse the repository at this point in the history
  • Loading branch information
Kroisse committed Feb 3, 2017
1 parent 6dc2838 commit 9286682
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions json/src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,12 @@ impl FromIterator<(String, Value)> for Map<String, Value> {
}
}

impl Extend<(String, Value)> for Map<String, Value> {
fn extend<T>(&mut self, iter: T) where T: IntoIterator<Item=(String, Value)> {
self.map.extend(iter);
}
}

macro_rules! delegate_iterator {
(($name:ident $($generics:tt)*) => $item:ty) => {
impl $($generics)* Iterator for $name $($generics)* {
Expand Down

0 comments on commit 9286682

Please sign in to comment.