Skip to content

feat: add into_status_default() convenience method - #10

Merged
ae2rs merged 1 commit into
mainfrom
feat/into-status-default
May 26, 2026
Merged

feat: add into_status_default() convenience method#10
ae2rs merged 1 commit into
mainfrom
feat/into-status-default

Conversation

@ae2rs

@ae2rs ae2rs commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a default method into_status_default() to the IntoStatus trait that calls into_status(&EncodeOptions::default()), eliminating the need for callers to construct default options explicitly
  • Updates the basic.rs example to demonstrate both the explicit and convenience forms
  • Updates the crate-level doc example (quick-start) to use the shorter form
  • Bumps workspace version from 0.6.3 to 0.6.4

Details

This is a purely additive, non-breaking change. The new default method on the trait means all existing IntoStatus implementors get into_status_default() for free — no manual implementation required.

Before:

let status = err.into_status(&EncodeOptions::default());

After:

let status = err.into_status_default();

The explicit into_status(&opts) form remains available for callers who need custom encode options.

Test plan

  • cargo test --workspace — all 51 tests pass (including updated doc-test)
  • CI: rustfmt, clippy, MSRV 1.85, full test suite

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ae2rs
ae2rs merged commit 3cbc843 into main May 26, 2026
4 checks passed
@ae2rs
ae2rs deleted the feat/into-status-default branch May 26, 2026 09:04
ae2rs added a commit that referenced this pull request May 26, 2026
Co-authored-by: ae2rs <ae2rs@users.noreply.github.com>
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