Skip to content

Commit b96bd11

Browse files
authored
Rollup merge of rust-lang#147246 - Kivooeo:btree-map-split-off-doc, r=Mark-Simulacrum
Explain not existed key in BTreeMap::split_off Fixes rust-lang#147174 r? libs
2 parents 8a2ec10 + 8fcb7e1 commit b96bd11

File tree

1 file changed

+2
-1
lines changed
  • library/alloc/src/collections/btree

1 file changed

+2
-1
lines changed

library/alloc/src/collections/btree/map.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,8 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
13681368
}
13691369

13701370
/// Splits the collection into two at the given key. Returns everything after the given key,
1371-
/// including the key.
1371+
/// including the key. If the key is not present, the split will occur at the nearest
1372+
/// greater key, or return an empty map if no such key exists.
13721373
///
13731374
/// # Examples
13741375
///

0 commit comments

Comments
 (0)