feat: add Any bound and as_any method to InvalidTxError trait#128
Merged
feat: add Any bound and as_any method to InvalidTxError trait#128
Conversation
Enables downcasting of InvalidTxError trait objects back to their concrete types for type-specific error handling. Closes #17356 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
klkvr
approved these changes
Jul 19, 2025
Member
klkvr
left a comment
There was a problem hiding this comment.
lgtm, we shouldn't need the as_any method with Rust 1.86
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
Anytrait bound toInvalidTxErrorand implements theas_any()method for downcasting trait objects back to their concrete types. This enables type-specific error handling when working with boxedInvalidTxErrortrait objects.Changes
Anyto the trait bounds ofInvalidTxErroras_any(&self) -> &dyn Anymethod to the traitas_any()forInvalidTransactionas_any()forOpTransactionError(whenopfeature is enabled)ref paradigmxyz/reth#17356
🤖 Generated with Claude Code