mirror of
https://github.com/0xMassi/webclaw.git
synced 2026-06-06 22:05:13 +02:00
fix: collapse nested if to satisfy clippy
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b92c0ed186
commit
dff458d2f5
1 changed files with 4 additions and 4 deletions
|
|
@ -191,10 +191,10 @@ impl WebclawMcp {
|
|||
async fn crawl(&self, Parameters(params): Parameters<CrawlParams>) -> Result<String, String> {
|
||||
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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue