-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
and_modify method should be part of the HashMap's Documentation. #98122
Copy link
Copy link
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.
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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I understand that
and_modifydeals with theEntryenum; however, I believe the method would be advantageous to developers when dealing with HashMaps.A common pattern I see when using hashmaps is something like this:
However, with
and_modifythis turns into this:Which leans more into idiomatic rust. I just learned of
and_modifytoday, and I believe more rust users would use it if they knew it existed. I think the problem is thatand_modifyis part of theEntryAPI.