From 00d9db14f74c6b4d532547f7acf38b3538574958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Habov=C5=A1tiak?= Date: Thu, 3 Oct 2019 10:09:04 +0200 Subject: [PATCH] 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. --- src/libstd/collections/hash/map.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index ff50051ef5040..c9596dc05bbf5 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -2362,6 +2362,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 Extend<(K, V)> for HashMap where