Skip to content

Avoid allocations by reusing AppErrorKind labels#140

Merged
RAprogramm merged 1 commit intonew_verisonfrom
eye-of-ra/add-label-method-to-apperrorkind
Sep 27, 2025
Merged

Avoid allocations by reusing AppErrorKind labels#140
RAprogramm merged 1 commit intonew_verisonfrom
eye-of-ra/add-label-method-to-apperrorkind

Conversation

@RAprogramm
Copy link
Owner

Summary

  • add an AppErrorKind::label helper reused by the Display impl and downstream formatters
  • return borrowed labels from Error::render_message, ProblemJson fallbacks, and ErrorResponse mappings to avoid extra String creation
  • update response tests to assert borrowed fallbacks and preserve redactable behaviour

Testing

  • cargo +nightly fmt --
  • cargo +1.90.0 clippy -- -D warnings
  • cargo +1.90.0 build --all-targets
  • cargo +1.90.0 test --all
  • cargo +1.90.0 doc --no-deps
  • cargo deny check
  • cargo audit

https://chatgpt.com/codex/tasks/task_e_68d72c231130832bbaa16dda1c1fecd2

@RAprogramm RAprogramm merged commit 673fe6c into new_verison Sep 27, 2025
1 of 2 checks passed
@RAprogramm RAprogramm deleted the eye-of-ra/add-label-method-to-apperrorkind branch September 27, 2025 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant