File tree 2 files changed +10
-5
lines changed
alloc/src/collections/btree
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -770,10 +770,14 @@ impl<T> BTreeSet<T> {
770
770
771
771
/// Adds a value to the set.
772
772
///
773
- /// If the set did not have an equal element present, `true` is returned.
773
+ /// Returns whether the value was newly inserted. That is:
774
774
///
775
- /// If the set did have an equal element present, `false` is returned, and
776
- /// the entry is not updated. See the [module-level documentation] for more.
775
+ /// - If the set did not previously contain an equal value, `true` is
776
+ /// returned.
777
+ /// - If the set already contained an equal value, `false` is returned, and
778
+ /// the entry is not updated.
779
+ ///
780
+ /// See the [module-level documentation] for more.
777
781
///
778
782
/// [module-level documentation]: index.html#insert-and-complex-keys
779
783
///
Original file line number Diff line number Diff line change @@ -858,9 +858,10 @@ where
858
858
859
859
/// Adds a value to the set.
860
860
///
861
- /// If the set did not have this value present, `true` is returned.
861
+ /// Returns whether the value was newly inserted. That is:
862
862
///
863
- /// If the set did have this value present, `false` is returned.
863
+ /// - If the set did not previously contain this value, `true` is returned.
864
+ /// - If the set already contained this value, `false` is returned.
864
865
///
865
866
/// # Examples
866
867
///
You can’t perform that action at this time.
0 commit comments