Skip to content

Commit 2569747

Browse files
committed
Fix docs for HashSet::insert
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.
1 parent 531b053 commit 2569747

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)