Skip to content

Commit 366ab78

Browse files
committed
Clarify docs for .pop()
1 parent 35b36eb commit 366ab78

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/map.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,8 @@ where
636636

637637
/// Remove the last key-value pair
638638
///
639+
/// This preserves the order of the remaining elements.
640+
///
639641
/// Computes in **O(1)** time (average).
640642
pub fn pop(&mut self) -> Option<(K, V)> {
641643
self.core.pop()

src/set.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,8 @@ where
532532

533533
/// Remove the last value
534534
///
535+
/// This preserves the order of the remaining elements.
536+
///
535537
/// Computes in **O(1)** time (average).
536538
pub fn pop(&mut self) -> Option<T> {
537539
self.map.pop().map(|(x, ())| x)

0 commit comments

Comments
 (0)