diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2017-01-13 10:42:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-13 10:42:26 +0100 |
| commit | 77ebb6a572f381eba70bf0243b8ae19a8003d54b (patch) | |
| tree | bff5ee7ecfd5d5a8335850e62d71714eb4657616 | |
| parent | 78e0a417efcc444a5f76d5535103f92e594a81d9 (diff) | |
| parent | 74b25876069ec06e1687e98cdb740743d5b57385 (diff) | |
| download | rust-77ebb6a572f381eba70bf0243b8ae19a8003d54b.tar.gz rust-77ebb6a572f381eba70bf0243b8ae19a8003d54b.zip | |
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.
| -rw-r--r-- | src/libcore/iter/traits.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libcore/iter/traits.rs b/src/libcore/iter/traits.rs index 25406696620..1e127148300 100644 --- a/src/libcore/iter/traits.rs +++ b/src/libcore/iter/traits.rs @@ -260,7 +260,10 @@ impl<I: Iterator> IntoIterator for 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 /// |
