Skip to content

Commit

Permalink
Rollup merge of rust-lang#65048 - Kixunil:patch-1, r=KodrAus
Browse files Browse the repository at this point in the history
Added doc about behavior of extend on HashMap

It was unclear what the implementation does when it encounters existing keys. This change makes it clear by documenting the trait impl.
  • Loading branch information
tmandry authored Oct 11, 2019
2 parents 5670c7f + 00d9db1 commit b851efb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libstd/collections/hash/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2409,6 +2409,8 @@ where
}
}

/// Inserts all new key-values from the iterator and replaces values with existing
/// keys with new values returned from the iterator.
#[stable(feature = "rust1", since = "1.0.0")]
impl<K, V, S> Extend<(K, V)> for HashMap<K, V, S>
where
Expand Down

0 comments on commit b851efb

Please sign in to comment.