Merge pull request #125 from cakebaker/clippy_fix_unnecessary_map_or

clippy: fix warning from unnecessary_map_or lint
This commit is contained in:
Terts Diepraam
2025-04-01 10:32:25 +02:00
committed by GitHub
+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();