summaryrefslogtreecommitdiffstats
path: root/src/pattern
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2020-10-20 21:28:40 +0200
committerCanop <cano.petrole@gmail.com>2020-10-20 21:28:40 +0200
commit56a82dac6900ae005ffd6b2a2574765d65a14072 (patch)
tree7a725e94759c98c6cd3f3c9d0699294e1f6695c7 /src/pattern
parent18cb0b6b8318886b7649791f057d10ca90c67df3 (diff)
keep tree options when going through not tree states
Diffstat (limited to 'src/pattern')
-rw-r--r--src/pattern/exact_pattern.rs5
-rw-r--r--src/pattern/fuzzy_pattern.rs5
2 files changed, 2 insertions, 8 deletions
diff --git a/src/pattern/exact_pattern.rs b/src/pattern/exact_pattern.rs
index 7bb71b2..6c0189c 100644
--- a/src/pattern/exact_pattern.rs
+++ b/src/pattern/exact_pattern.rs
@@ -30,10 +30,7 @@ impl fmt::Display for ExactPattern {
}
fn is_word_separator(c: u8) -> bool {
- match c {
- b'_' | b' ' | b'-' | b'/' => true,
- _ => false,
- }
+ matches!(c, b'_' | b' ' | b'-' | b'/')
}
impl ExactPattern {
diff --git a/src/pattern/fuzzy_pattern.rs b/src/pattern/fuzzy_pattern.rs
index 7e3db77..91daa09 100644
--- a/src/pattern/fuzzy_pattern.rs
+++ b/src/pattern/fuzzy_pattern.rs
@@ -46,10 +46,7 @@ enum ScoreSearchResult {
}
fn is_word_separator(c: char) -> bool {
- match c {
- '_' | ' ' | '-' => true,
- _ => false,
- }
+ matches!(c, '_' | ' ' | '-')
}
impl FuzzyPattern {