Skip to content

jsondoclint: simplify code using idiomatic Rust#155169

Open
AMMAAR-IC wants to merge 1 commit intorust-lang:mainfrom
AMMAAR-IC:jsondoclint-cleanup
Open

jsondoclint: simplify code using idiomatic Rust#155169
AMMAAR-IC wants to merge 1 commit intorust-lang:mainfrom
AMMAAR-IC:jsondoclint-cleanup

Conversation

@AMMAAR-IC
Copy link
Copy Markdown

Simplify jsondoclint with small idiomatic Rust cleanups. No behavior changes.

  • Use matches!() macro instead of match in item_kind.rs
  • Remove unnecessary derefs and simplify Option mapping in validator.rs
  • Replace clone() on Copy type with *id
  • Fix doc comment indentation
  • Remove redundant tuple parens in tests.rs
  • Remove needless borrow and closure in main.rs

Verified:

  • cargo clippy -p jsondoclint --tests --quiet → no warnings
  • cargo test -p jsondoclint --quiet → all 5 tests pass

- Use matches!() macro instead of match in item_kind.rs
- Remove unnecessary derefs and simplify Option mapping in validator.rs
- Replace clone() on Copy type with *id
- Fix doc comment indentation
- Remove redundant tuple parens in tests.rs
- Remove needless borrow and closure in main.rs
@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 11, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 11, 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:

  • Fallback group: @Mark-Simulacrum, @jieyouxu
  • @Mark-Simulacrum, @jieyouxu expanded to Mark-Simulacrum, jieyouxu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants