about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2019-10-11 15:09:44 -0700
committerGitHub <noreply@github.com>2019-10-11 15:09:44 -0700
commitec1d008f65d559eca3a1dbb062e88dbaae30b8e8 (patch)
tree4ec8a9f67eea2599e36d02e21849fc8d57dbab51 /src/libstd
parentea0d155f2d0fa8328c93ee7ca52f96ccd764ccf0 (diff)
parent00d9db14f74c6b4d532547f7acf38b3538574958 (diff)
downloadrust-ec1d008f65d559eca3a1dbb062e88dbaae30b8e8.tar.gz
rust-ec1d008f65d559eca3a1dbb062e88dbaae30b8e8.zip
Rollup merge of #65048 - Kixunil:patch-1, r=KodrAus
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.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/map.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index fcca112563d..6b0225a1b44 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -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