-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Description
rust/library/core/src/iter/mod.rs
Lines 245 to 248 in 1eb7258
//! 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()`. |
While many collections offer iter(), not all offer iter_mut(). For example, mutating the keys of a HashSet or HashMap<K, V> could put the collection into an inconsistent state if the key hashes change, so these collections only offer iter().
HashMap clearly has iter_mut https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.iter_mut while HashSet does not.
Docs should be changed to reflect this. I would be happy to do this, but as I have not contributed to Rust before, wanted to make sure I didn't miss something here.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.