forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btree: simplify the backdoor between set and map
The internal `btree::Recover` trait acted as a private API between `BTreeSet` and `BTreeMap`, but we can use `pub(_)` restrictions these days, and some of the methods don't need special handling anymore. * `BTreeSet::get` can use `BTreeMap::get_key_value` * `BTreeSet::take` can use `BTreeMap::remove_entry` * `BTreeSet::replace` does need help, but this now uses a `pub(super)` method on `BTreeMap` instead of the trait. * `btree::Recover` is now removed.
- Loading branch information
Showing
4 changed files
with
11 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters