Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bryevdv committed Oct 19, 2023
1 parent 03fd91b commit ffda863
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1187,10 +1187,10 @@ impl SearchState {

fn is_string_match(&self, s: &str) -> bool {
if self.whole_word {
match &self.last_word_regex {
Some(regex) => regex.is_match(s),
_ => false,
}
let Some(regex) = &self.last_word_regex else {
unreachable!();
};
regex.is_match(s)
} else {
s.contains(&self.query)
}
Expand Down

0 comments on commit ffda863

Please sign in to comment.