From 6fca269adf18b1dd0ef0e62f5e8744c7cba51725 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 6 Jan 2022 10:39:49 -0800 Subject: [PATCH] No extra space is used in unstable sorts --- src/map.rs | 2 +- src/set.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map.rs b/src/map.rs index 6032c339..76993c36 100644 --- a/src/map.rs +++ b/src/map.rs @@ -725,7 +725,7 @@ where /// The comparison function receives two key and value pairs to compare (you /// can sort by keys or values or their combination as needed). /// - /// Computes in **O(n log n + c)** time and **O(n)** space where *n* is + /// Computes in **O(n log n + c)** time where *n* is /// the length of the map and *c* is the capacity. The sort is unstable. pub fn sort_unstable_by(&mut self, mut cmp: F) where diff --git a/src/set.rs b/src/set.rs index 72a386c5..ddd1cc38 100644 --- a/src/set.rs +++ b/src/set.rs @@ -596,7 +596,7 @@ where /// Sort the set's values in place using the comparison funtion `cmp`. /// - /// Computes in **O(n log n)** time and **O(n)** space. The sort is unstable. + /// Computes in **O(n log n)** time. The sort is unstable. pub fn sort_unstable_by(&mut self, mut cmp: F) where F: FnMut(&T, &T) -> Ordering,