From 9ebb170c662128d44c2bd0c544038b92c6f108fe Mon Sep 17 00:00:00 2001 From: Denis Cornehl Date: Fri, 10 Jan 2025 05:04:31 +0100 Subject: [PATCH] fix new clippy error --- src/web/rustdoc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/rustdoc.rs b/src/web/rustdoc.rs index 666040803..b66a1e90b 100644 --- a/src/web/rustdoc.rs +++ b/src/web/rustdoc.rs @@ -500,7 +500,7 @@ pub(crate) async fn rustdoc_html_server_handler( } } - if req_path.first().map_or(false, |p| p.contains('-')) { + if req_path.first().is_some_and(|p| p.contains('-')) { // This is a target, not a module; it may not have been built. // Redirect to the default target and show a search page instead of a hard 404. return Ok(axum_cached_redirect(