From dff458d2f5263c96013758fc0c583a8f76f64b9d Mon Sep 17 00:00:00 2001 From: Valerio Date: Tue, 24 Mar 2026 17:28:57 +0100 Subject: [PATCH] fix: collapse nested if to satisfy clippy Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/webclaw-mcp/src/server.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/webclaw-mcp/src/server.rs b/crates/webclaw-mcp/src/server.rs index 1f3e1c7..41dd0a9 100644 --- a/crates/webclaw-mcp/src/server.rs +++ b/crates/webclaw-mcp/src/server.rs @@ -191,10 +191,10 @@ impl WebclawMcp { async fn crawl(&self, Parameters(params): Parameters) -> Result { validate_url(¶ms.url)?; - if let Some(max) = params.max_pages { - if max > 500 { - return Err("max_pages cannot exceed 500".into()); - } + if let Some(max) = params.max_pages + && max > 500 + { + return Err("max_pages cannot exceed 500".into()); } let format = params.format.as_deref().unwrap_or("markdown");