Skip to content

Commit 94ec5f8

Browse files
committed
Auto merge of #29851 - shahn:hashset_doc_fix, r=steveklabnik
insert() returns bool, but it was wrongly stated that if the set had the key already present, that key would be returned (this was probably copied from the HashMap docs). Also remove a reference to the module-level documentation, which doesn't make sense as it doesn't give any more context. r? @steveklabnik
2 parents af5d9d6 + 2569747 commit 94ec5f8

File tree

1 file changed

+1
-4
lines changed
  • src/libstd/collections/hash

1 file changed

+1
-4
lines changed

src/libstd/collections/hash/set.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,10 +544,7 @@ impl<T, S> HashSet<T, S>
544544
///
545545
/// If the set did not have a value present, `true` is returned.
546546
///
547-
/// If the set did have this key present, that value is returned, and the
548-
/// entry is not updated. See the [module-level documentation] for more.
549-
///
550-
/// [module-level documentation]: index.html#insert-and-complex-keys
547+
/// If the set did have this key present, `false` is returned.
551548
///
552549
/// # Examples
553550
///

0 commit comments

Comments
 (0)