Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rpc): Add more helpers for TraceResult #815

Merged
merged 6 commits into from
Jun 3, 2024

Conversation

tcoratger
Copy link
Contributor

Description

This pull request enhances the TraceResult enum by adding more helper methods to improve usability and readability.

Changes Made

  • Added is_success() and is_error() methods to check the result type easily.
  • Added result() and error() methods to get the result or error payload respectively.
  • Updated the unit tests to cover the new helper methods.

@mattsse mattsse changed the title Add more helpers for TraceResult feat(rpc): Add more helpers for TraceResult Jun 3, 2024
crates/rpc-types-trace/src/common.rs Outdated Show resolved Hide resolved
@mattsse mattsse force-pushed the TraceResult-helpers branch from 2e0ce73 to 8e761a9 Compare June 3, 2024 15:20
@mattsse mattsse merged commit 91e8a0f into alloy-rs:main Jun 3, 2024
24 checks passed
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
* Add more helpers for TraceResult

* clean up

* clean up

* fix clippy

* Update crates/rpc-types-trace/src/common.rs

* update test

---------

Co-authored-by: Matthias Seitz <[email protected]>
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.

2 participants