fix: collapse nested if to satisfy clippy

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Valerio 2026-03-24 17:28:57 +01:00
parent b92c0ed186
commit dff458d2f5

View file

@ -191,10 +191,10 @@ impl WebclawMcp {
async fn crawl(&self, Parameters(params): Parameters<CrawlParams>) -> Result<String, String> {
validate_url(&params.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");