From b02146a370e8e07186d4bd2c264699300ca925df Mon Sep 17 00:00:00 2001 From: Ariel Davis Date: Tue, 31 May 2022 22:08:14 -0700 Subject: Tweak insert docs --- library/alloc/src/collections/btree/set.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'library/alloc') diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs index 20ef834eaee..caa629cf4e6 100644 --- a/library/alloc/src/collections/btree/set.rs +++ b/library/alloc/src/collections/btree/set.rs @@ -770,10 +770,14 @@ impl BTreeSet { /// Adds a value to the set. /// - /// If the set did not have an equal element present, `true` is returned. + /// Returns whether the value was newly inserted. That is: /// - /// If the set did have an equal element present, `false` is returned, and - /// the entry is not updated. See the [module-level documentation] for more. + /// - If the set did not previously contain an equal value, `true` is + /// returned. + /// - If the set already contained an equal value, `false` is returned, and + /// the entry is not updated. + /// + /// See the [module-level documentation] for more. /// /// [module-level documentation]: index.html#insert-and-complex-keys /// -- cgit 1.4.1-3-g733a5