From 2cdf904daf5d01477857dadd5bd51884d474a551 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Fri, 10 Jan 2025 15:00:06 +0100 Subject: [PATCH] clippy: fix warning from unnecessary_map_or lint --- derive/src/help_parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/derive/src/help_parser.rs b/derive/src/help_parser.rs index 3d9e5ae..16a0dba 100644 --- a/derive/src/help_parser.rs +++ b/derive/src/help_parser.rs @@ -71,7 +71,7 @@ pub fn parse_usage(content: &str) -> String { pub fn parse_section(section: &str, content: &str) -> Option { fn is_section_header(line: &str, section: &str) -> bool { line.strip_prefix("##") - .map_or(false, |l| l.trim().to_lowercase() == section) + .is_some_and(|l| l.trim().to_lowercase() == section) } let section = §ion.to_lowercase();