Skip to content

Replace println! with assert! in HashMap documentation examples#156630

Open
BowLuckie wants to merge 4 commits into
rust-lang:mainfrom
BowLuckie:main
Open

Replace println! with assert! in HashMap documentation examples#156630
BowLuckie wants to merge 4 commits into
rust-lang:mainfrom
BowLuckie:main

Conversation

@BowLuckie
Copy link
Copy Markdown

@BowLuckie BowLuckie commented May 16, 2026

Changes

  • .keys()
  • .values()
  • .values_mut()
  • .iter()
  • .iter_mut()

BowLuckie added 2 commits May 16, 2026 10:35
…in documentations

Updated `.keys()`, `.values()`, `.iter()` and `.iter_mut()`. 

Instead of using print statements which shows no clear effect  by just reading the documentation
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 16, 2026
`.keys()` was using `.values()` in the comment and 2 other functions were missing `use std::collections::HashMap`
@BowLuckie BowLuckie marked this pull request as ready for review May 16, 2026 01:36
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 16, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 16, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 16, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 8 candidates

@rust-log-analyzer

This comment has been minimized.

at lines 495 and 558
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants