Rollup merge of #38636 - shahn:extend, r=steveklabnik

Clarify Extend behaviour wrt existing keys

This seems to be consistent with all the Extend implementations I found, and isn't documented anywhere else afaik.
This commit is contained in:
Guillaume Gomez 2017-01-13 10:42:26 +01:00 committed by GitHub
commit 77ebb6a572

View file

@ -260,7 +260,10 @@ fn into_iter(self) -> I {
///
/// Iterators produce a series of values, and collections can also be thought
/// of as a series of values. The `Extend` trait bridges this gap, allowing you
/// to extend a collection by including the contents of that iterator.
/// to extend a collection by including the contents of that iterator. When
/// extending a collection with an already existing key, that entry is updated
/// or, in the case of collections that permit multiple entries with equal
/// keys, that entry is inserted.
///
/// # Examples
///