mirror of
https://github.com/uutils/uutils-args.git
synced 2026-06-10 16:13:08 -07:00
Merge pull request #125 from cakebaker/clippy_fix_unnecessary_map_or
clippy: fix warning from unnecessary_map_or lint
This commit is contained in:
@@ -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 = §ion.to_lowercase();
|
||||
|
||||
Reference in New Issue
Block a user