mirror of
https://github.com/rust-lang/rust
synced 2024-09-18 16:02:39 +00:00
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:
commit
77ebb6a572
|
@ -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
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue