Skip to content

Commit

Permalink
Rollup merge of rust-lang#128310 - kmicklas:btree-map-peek-next-docs,…
Browse files Browse the repository at this point in the history
… r=tgross35

Add missing periods on `BTreeMap` cursor `peek_next` docs

Tracking issue: rust-lang#107540
  • Loading branch information
tgross35 committed Jul 28, 2024
2 parents 4fd5e84 + 0468983 commit 4f330b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/alloc/src/collections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2921,7 +2921,7 @@ impl<'a, K, V> Cursor<'a, K, V> {
/// Returns a reference to the key and value of the next element without
/// moving the cursor.
///
/// If the cursor is at the end of the map then `None` is returned
/// If the cursor is at the end of the map then `None` is returned.
#[unstable(feature = "btree_cursors", issue = "107540")]
pub fn peek_next(&self) -> Option<(&'a K, &'a V)> {
self.clone().next()
Expand Down Expand Up @@ -2963,7 +2963,7 @@ impl<'a, K, V, A> CursorMut<'a, K, V, A> {
/// Returns a reference to the key and value of the next element without
/// moving the cursor.
///
/// If the cursor is at the end of the map then `None` is returned
/// If the cursor is at the end of the map then `None` is returned.
#[unstable(feature = "btree_cursors", issue = "107540")]
pub fn peek_next(&mut self) -> Option<(&K, &mut V)> {
let (k, v) = self.inner.peek_next()?;
Expand Down Expand Up @@ -3061,7 +3061,7 @@ impl<'a, K, V, A> CursorMutKey<'a, K, V, A> {
/// Returns a reference to the key and value of the next element without
/// moving the cursor.
///
/// If the cursor is at the end of the map then `None` is returned
/// If the cursor is at the end of the map then `None` is returned.
#[unstable(feature = "btree_cursors", issue = "107540")]
pub fn peek_next(&mut self) -> Option<(&mut K, &mut V)> {
let current = self.current.as_mut()?;
Expand Down

0 comments on commit 4f330b7

Please sign in to comment.