refactor: rename Substitutor.matcher_type to matcher

This commit is contained in:
Harsh Shandilya 2022-02-20 13:50:55 +05:30
parent 6c4b5f617b
commit 80e33e97e6
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
3 changed files with 4 additions and 4 deletions

View file

@ -58,7 +58,7 @@ fn loop_clipboard<'a>(config: Replacements<'a>) {
let mut clipboard_contents = get_clipboard_contents(&mut clipboard);
while let Ok(contents) = clipboard_contents.as_deref() {
if let Some(subst) = config.substitutors.iter().find(|subst| {
return match &subst.matcher_type {
return match &subst.matcher {
MatcherType::Single(matcher) => matcher.check_match(contents),
MatcherType::Multiple(matchers) => {
matchers.iter().all(|matcher| matcher.check_match(contents))