Skip to content

Commit

Permalink
Auto merge of #95326 - lupd:std-iter-doc, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Remove mention of `HashMap<K, V>` not offering `iter_mut`

HashMap<K, V> does offer iter_mut. Fixes #94755.

r? rust-lang/libs
`@rustbot` label +A-docs +T-libs
  • Loading branch information
bors committed Mar 26, 2022
2 parents bc881e8 + 1513424 commit 1fca19c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions library/core/src/iter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,12 @@
//! ```
//!
//! While many collections offer `iter()`, not all offer `iter_mut()`. For
//! example, mutating the keys of a [`HashSet<T>`] or [`HashMap<K, V>`] could
//! put the collection into an inconsistent state if the key hashes change, so
//! these collections only offer `iter()`.
//! example, mutating the keys of a [`HashSet<T>`] could put the collection
//! into an inconsistent state if the key hashes change, so this collection
//! only offers `iter()`.
//!
//! [`into_iter()`]: IntoIterator::into_iter
//! [`HashSet<T>`]: ../../std/collections/struct.HashSet.html
//! [`HashMap<K, V>`]: ../../std/collections/struct.HashMap.html
//!
//! # Adapters
//!
Expand Down

0 comments on commit 1fca19c

Please sign in to comment.