Skip to content

fix: address review nits from #42#43

Open
prestwich wants to merge 1 commit intomainfrom
prestwich/nits-42
Open

fix: address review nits from #42#43
prestwich wants to merge 1 commit intomainfrom
prestwich/nits-42

Conversation

@prestwich
Copy link
Member

Summary

  • Use application-level error codes (1001+, 2001+) instead of reserved JSON-RPC range [-32099, -32000] in examples and doc tests
  • Fix doc example error codes that looked like HTTP status codes (404, 429)
  • Add impl IntoErrorPayload for core::convert::Infallible
  • Clarify in trait docs that ErrData associated type must also be specified
  • Refactor magic8ball into_error_payload match to take self by value, removing unnecessary .clone()

Addresses non-blocking nits from @0xfmac on #42.

Test plan

  • cargo t -p ajj — all 25 unit + 20 doc-tests pass
  • cargo clippy --all-features --all-targets clean
  • cargo clippy --no-default-features --all-targets clean

🤖 Generated with Claude Code

- Use application-level error codes instead of reserved JSON-RPC range
- Fix doc example codes that looked like HTTP status codes
- Add IntoErrorPayload impl for core::convert::Infallible
- Clarify that ErrData associated type is required in trait docs
- Refactor magic8ball match to take ownership, removing unnecessary clone

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@prestwich prestwich requested a review from Fraser999 March 26, 2026 15:33
@prestwich
Copy link
Member Author

opted not to include a rename of ErrData as the compiler enforces correct usage, and there are >50 places to update

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant