diff options
| author | ripytide <james.forsterer@gmail.com> | 2024-02-11 16:18:40 +0000 |
|---|---|---|
| committer | ripytide <james.forsterer@gmail.com> | 2024-02-11 16:18:40 +0000 |
| commit | f4153390527cc6396d19f68097d34a7a3a1e7edb (patch) | |
| tree | d2e441247492fecb1560c667217efb459762f9c0 | |
| parent | 792fa24595c9a65249dd8de815549f3641548ad3 (diff) | |
| download | rust-f4153390527cc6396d19f68097d34a7a3a1e7edb.tar.gz rust-f4153390527cc6396d19f68097d34a7a3a1e7edb.zip | |
fix incorrect doctest
| -rw-r--r-- | library/alloc/src/collections/btree/map.rs | 4 |
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"))); |
