about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorStein Somers <git@steinsomers.be>2020-11-18 18:19:38 +0100
committerStein Somers <git@steinsomers.be>2021-07-12 22:48:14 +0200
commit10b65c821fec2a37aa30e4ac7e2190981a8a49ef (patch)
tree70c87f16e688d4476016e3960aedbb3373d872ed /library/alloc/src
parentb5a2ccee81406303324016d03399fac68ceb6718 (diff)
downloadrust-10b65c821fec2a37aa30e4ac7e2190981a8a49ef.tar.gz
rust-10b65c821fec2a37aa30e4ac7e2190981a8a49ef.zip
Make BTreeSet::split_off name elements like other set methods do
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/collections/btree/set.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs
index 45ea30b5386..be740b05fb8 100644
--- a/library/alloc/src/collections/btree/set.rs
+++ b/library/alloc/src/collections/btree/set.rs
@@ -903,8 +903,8 @@ impl<T> BTreeSet<T> {
         self.map.append(&mut other.map);
     }
 
-    /// Splits the collection into two at the given key. Returns everything after the given key,
-    /// including the key.
+    /// Splits the collection into two at the given value. Returns everything after the given value,
+    /// including the value.
     ///
     /// # Examples
     ///
@@ -933,11 +933,11 @@ impl<T> BTreeSet<T> {
     /// assert!(b.contains(&41));
     /// ```
     #[stable(feature = "btree_split_off", since = "1.11.0")]
-    pub fn split_off<Q: ?Sized + Ord>(&mut self, key: &Q) -> Self
+    pub fn split_off<Q: ?Sized + Ord>(&mut self, value: &Q) -> Self
     where
         T: Borrow<Q> + Ord,
     {
-        BTreeSet { map: self.map.split_off(key) }
+        BTreeSet { map: self.map.split_off(value) }
     }
 
     /// Creates an iterator that visits all values in ascending order and uses a closure