1
Fork 0

Explain how to mutate a HashMap/BTreeMap with more nuance

This commit is contained in:
Michael Goulet 2024-12-31 01:03:18 +00:00
parent 7f75bfa1ad
commit b994124778
5 changed files with 5 additions and 5 deletions

View file

@ -575,7 +575,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
// ---------- place
self.err.multipart_suggestions(
format!(
"to modify a `{}`, use `.get_mut()`, `.insert()` or the entry API",
"use `.insert()` to insert a value into a `{}`, `.get_mut()` to modify it, or the entry API for more flexibility",
self.ty,
),
vec![