Skip to content

fix: satisfy Clippy question_mark lint#68

Merged
Praz314159 merged 1 commit into
mainfrom
fix/clippy-question-mark-lint
Jul 16, 2026
Merged

fix: satisfy Clippy question_mark lint#68
Praz314159 merged 1 commit into
mainfrom
fix/clippy-question-mark-lint

Conversation

@rdave8

@rdave8 rdave8 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix the Clippy question_mark lint in the revert-data decoder.

Changes

  • Replace manual Option matching and return None logic with the idiomatic ? operator
  • Preserve the existing behavior for quoted, unquoted, and missing revert data

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of unquoted revert messages when extracting error data.
    • More reliably identifies hexadecimal revert payloads and gracefully handles messages without valid revert data.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d261c223-20dc-425f-bdca-63d7c1111e7a

📥 Commits

Reviewing files that changed from the base of the PR and between 760d953 and 19b2168.

📒 Files selected for processing (1)
  • src/errors/decode.rs

📝 Walkthrough

Walkthrough

The try_extract_revert fallback parsing in src/errors/decode.rs now uses early-return lookup for unquoted data: 0x... payloads while preserving existing payload boundary detection and decoding behavior.

Changes

Revert decoding

Layer / File(s) Summary
Unquoted revert fallback parsing
src/errors/decode.rs
The fallback branch uses find("data: 0x")? and retains the existing hexadecimal payload scanning and decoding flow.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: praz314159

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main intent: a Clippy question_mark lint fix in the revert-data decoder.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/clippy-question-mark-lint

Comment @coderabbitai help to get the list of available commands.

@Praz314159
Praz314159 merged commit 0e1ed1f into main Jul 16, 2026
8 checks passed
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