-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
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
As we already have get()
and Index
, and also get_mut()
it's strange not to have IndexMut
-- it should be pretty straightforward using get_mut()
:
impl<'a, K, Q, V> IndexMut<&'a Q> for BTreeMap<K, V>
where K: Ord + Borrow<Q>, Q: Ord + ?Sized {
fn index_mut(&mut self, index: &Q) -> &mut Self::Output {
self.get_mut(index).unwrap()
}
}
Metadata
Metadata
Assignees
Labels
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.