File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
library/alloc/src/collections/btree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -679,7 +679,7 @@ impl<T: Ord> BTreeSet<T> {
679
679
/// ```
680
680
#[ unstable( feature = "map_first_last" , issue = "62924" ) ]
681
681
pub fn pop_first ( & mut self ) -> Option < T > {
682
- self . map . first_entry ( ) . map ( |entry| entry . remove_entry ( ) . 0 )
682
+ self . map . pop_first ( ) . map ( |kv| kv . 0 )
683
683
}
684
684
685
685
/// Removes the last value from the set and returns it, if any.
@@ -701,7 +701,7 @@ impl<T: Ord> BTreeSet<T> {
701
701
/// ```
702
702
#[ unstable( feature = "map_first_last" , issue = "62924" ) ]
703
703
pub fn pop_last ( & mut self ) -> Option < T > {
704
- self . map . last_entry ( ) . map ( |entry| entry . remove_entry ( ) . 0 )
704
+ self . map . pop_last ( ) . map ( |kv| kv . 0 )
705
705
}
706
706
707
707
/// Adds a value to the set.
You can’t perform that action at this time.
0 commit comments