Skip to content

Commit

Permalink
clippy: fix warning from unnecessary_map_or lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cakebaker committed Jan 10, 2025
1 parent a3ecc62 commit 2cdf904
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion derive/src/help_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 2cdf904

Please sign in to comment.