Skip to content

Commit

Permalink
Doc fix for HashSet::insert().
Browse files Browse the repository at this point in the history
Fixed documentation about the return value of `HashSet::insert()`.
  • Loading branch information
arendjr authored and ibraheemdev committed Dec 1, 2024
1 parent 88d3c6f commit 6e0fd42
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,11 @@ where

/// Inserts a value into the set.
///
/// If the set did not have this key present, [`None`] is returned.
/// If the set did not have this key present, `true` is returned.
///
/// If the set 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 [standard library
/// documentation] for details.
/// If the set did have this key present, `false` is returned and the old
/// value is not updated. This matters for types that can be `==` without
/// being identical. See the [standard library documentation] for details.
///
/// [standard library documentation]: https://doc.rust-lang.org/std/collections/index.html#insert-and-complex-keys
///
Expand Down

0 comments on commit 6e0fd42

Please sign in to comment.