Skip to content

Commit

Permalink
Rollup merge of #120936 - ripytide:master, r=Amanieu
Browse files Browse the repository at this point in the history
improve `btree_cursors` functions documentation

As suggested by ``@Amanieu`` (and others) in #107540 (rust-lang/rust#107540 (comment))

Improvements:
- Document exact behavior of `{upper/lower}_bound{,_mut}` with each of the three `Bound` types using unambigous words `{greatest,greater,smallest,smaller,before,after}`.
- Added another doc-example for the `Bound::Unbounded` for each of the methods
- Changed doc-example to use From<[T; N]> rather than lots of `insert()`s which requires a mutable map which clutters the example when `mut` may not be required for the method (such as for `{upper,lower}_bound`.
- Removed `# Panics` section from `insert_{before,after}` methods since they were changed to return an error instead a while ago.
- Reworded some phrases to be more consistent with the more regular `BTreeMap` methods such as calling entries "key-value" rather than "element"s.
  • Loading branch information
matthiaskrgr authored Feb 12, 2024
2 parents 6139631 + 97741eb commit 8f3bb17
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 8f3bb17

Please sign in to comment.