about summary refs log tree commit diff
diff options
context:
space:
mode:
authorripytide <james.forsterer@gmail.com>2024-02-11 16:18:40 +0000
committerripytide <james.forsterer@gmail.com>2024-02-11 16:18:40 +0000
commitf4153390527cc6396d19f68097d34a7a3a1e7edb (patch)
treed2e441247492fecb1560c667217efb459762f9c0
parent792fa24595c9a65249dd8de815549f3641548ad3 (diff)
downloadrust-f4153390527cc6396d19f68097d34a7a3a1e7edb.tar.gz
rust-f4153390527cc6396d19f68097d34a7a3a1e7edb.zip
fix incorrect doctest
-rw-r--r--library/alloc/src/collections/btree/map.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs
index 724a070818d..770b68c3dde 100644
--- a/library/alloc/src/collections/btree/map.rs
+++ b/library/alloc/src/collections/btree/map.rs
@@ -2673,8 +2673,8 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
     /// ]);
     ///
     /// let cursor = map.upper_bound(Bound::Included(&3));
-    /// assert_eq!(cursor.peek_prev(), Some((&3, &"d")));
-    /// assert_eq!(cursor.peek_next(), Some((&4, &"c")));
+    /// assert_eq!(cursor.peek_prev(), Some((&3, &"c")));
+    /// assert_eq!(cursor.peek_next(), Some((&4, &"d")));
     ///
     /// let cursor = map.upper_bound(Bound::Excluded(&3));
     /// assert_eq!(cursor.peek_prev(), Some((&2, &"b")));