about summary refs log tree commit diff
path: root/src/libstd/collections/hash
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2016-02-17 18:14:36 -0500
committerSteve Klabnik <steve@steveklabnik.com>2016-02-17 18:14:36 -0500
commit27ef9df824e2d5b0e22b48dfcfc19906e1ea35ca (patch)
treef4a630e16147ea2289f49c10b18f2ae341b12078 /src/libstd/collections/hash
parent0a88c8fb197fa10eb36c10215066b87badd3b67b (diff)
parent2cac9d7bd3f26072e101ccabcb4913ef05f46d7c (diff)
downloadrust-27ef9df824e2d5b0e22b48dfcfc19906e1ea35ca.tar.gz
rust-27ef9df824e2d5b0e22b48dfcfc19906e1ea35ca.zip
Rollup merge of #31694 - oconnor663:insertdocs, r=steveklabnik
The first time I read the docs for `insert()`, I thought it was saying it didn't update existing *values*, and I was confused. Reword the docs to make it clear that `insert()` does update values.
Diffstat (limited to 'src/libstd/collections/hash')
-rw-r--r--src/libstd/collections/hash/map.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 586fafc2b4a..7220690469c 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -1157,9 +1157,10 @@ impl<K, V, S> HashMap<K, V, S>
     ///
     /// If the map did not have this key present, `None` is returned.
     ///
-    /// If the map did have this key present, the key is not updated, the
-    /// value is updated and the old value is returned.
-    /// See the [module-level documentation] for more.
+    /// If the map did have this key present, the value is updated, and the old
+    /// value is returned. The key is not updated, though; this matters for
+    /// types that can be `==` without being identical. See the [module-level
+    /// documentation] for more.
     ///
     /// [module-level documentation]: index.html#insert-and-complex-keys
     ///