clippy: fix warning from unnecessary_map_or lint

This commit is contained in:
Daniel Hofstetter
2025-01-10 15:00:06 +01:00
parent a3ecc624a9
commit 2cdf904daf
+1 -1
View File
@@ -71,7 +71,7 @@ pub fn parse_usage(content: &str) -> String {
pub fn parse_section(section: &str, content: &str) -> Option<String> {
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 = &section.to_lowercase();