diff options
| author | Martin Habovštiak <martin.habovstiak@gmail.com> | 2019-10-03 10:09:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-03 10:09:04 +0200 |
| commit | 00d9db14f74c6b4d532547f7acf38b3538574958 (patch) | |
| tree | c4e7dc94909c16887751b1c1bd1233eef8c46ebf | |
| parent | c6293e359848c8c7275330719b33ccd168df04c3 (diff) | |
| download | rust-00d9db14f74c6b4d532547f7acf38b3538574958.tar.gz rust-00d9db14f74c6b4d532547f7acf38b3538574958.zip | |
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.
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index ff50051ef50..c9596dc05bb 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<K, V, S> Extend<(K, V)> for HashMap<K, V, S> where |
