-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed
Labels
C-feature-acceptedCategory: A feature request that has been accepted pending implementation.Category: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Basically just
pub fn get_both<Q: ?Sized>(&self, k: &Q) -> Option<(&K,&V)>
where K: Borrow<Q>,
Q: Hash + Eq
{
self.search(k).into_occupied_bucket().map(|bucket| bucket.into_refs())
}
sometimes you need a reference to a key with the lifetime of the collection.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-feature-acceptedCategory: A feature request that has been accepted pending implementation.Category: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.