Skip to content

Commit 4a20667

Browse files
committed
Fix a couple more warnings.
1 parent a03b24a commit 4a20667

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/analysis/line_classifier.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ fn find_block_comment_end_or_nested_start(
138138
(Some(s), Some(e)) if s < e => return Some((s, start.len(), true)),
139139
(Some(s), None) => return Some((s, start.len(), true)),
140140
(_, Some(e)) => return Some((e, end.len(), false)),
141-
_ => continue,
141+
_ => {},
142142
}
143143
}
144144
None

src/language/detection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::utils::pluralize;
33
include!(concat!(env!("OUT_DIR"), "/languages.rs"));
44

55
fn matches_pattern(filename: &str, pattern: &str) -> bool {
6-
if let Some(suffix) = pattern.strip_prefix('*') { filename.ends_with(suffix) } else { filename == pattern }
6+
pattern.strip_prefix('*').map_or_else(|| filename == pattern, |suffix| filename.ends_with(suffix))
77
}
88

99
/// Detect the programming language of a file based on its filename

0 commit comments

Comments
 (0)