We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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():
get()
Index
get_mut()
IndexMut
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() } }
The text was updated successfully, but these errors were encountered:
These have been intentionally left off to make sure that there won't be any breakage if/when IndexAssign traits are added.
Sorry, something went wrong.
Closing in favor of #25034.
No branches or pull requests
As we already have
get()
andIndex
, and alsoget_mut()
it's strange not to haveIndexMut
-- it should be pretty straightforward usingget_mut()
:The text was updated successfully, but these errors were encountered: