From 19b2168dd5fbd4dc81995c6dd672182d295349f7 Mon Sep 17 00:00:00 2001 From: Rohan Date: Wed, 15 Jul 2026 14:29:00 -0400 Subject: [PATCH] fix: satisfy Clippy question_mark lint --- src/errors/decode.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/errors/decode.rs b/src/errors/decode.rs index 097ef60..d8016f3 100644 --- a/src/errors/decode.rs +++ b/src/errors/decode.rs @@ -126,7 +126,8 @@ pub fn try_extract_revert(error: &str) -> Option<(String, String, Option let start = idx + "data: \"".len(); let end = error[start..].find('"').map(|i| start + i)?; &error[start..end] - } else if let Some(idx) = error.find("data: 0x") { + } else { + let idx = error.find("data: 0x")?; // Some RPC providers omit the quotes let start = idx + "data: ".len(); let end = error[start..] @@ -134,8 +135,6 @@ pub fn try_extract_revert(error: &str) -> Option<(String, String, Option .map(|i| start + i) .unwrap_or(error.len()); &error[start..end] - } else { - return None; }; if data.len() < 10 {