Skip to content

Commit

Permalink
use matches!
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Zhuk <vladimir.zhuk@datadoghq.com>
  • Loading branch information
vladimir-dd committed Aug 23, 2021
1 parent d924c53 commit dce9511
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/datadog/grok/src/parse_grok_rules.rs
Expand Up @@ -137,7 +137,16 @@ fn parse_grok_rule<'a>(
grok_patterns
.iter()
.filter(|&rule| {
rule.destination.is_some() && rule.destination.as_ref().unwrap().filter_fn.is_some()
matches!(
rule,
GrokPattern {
destination: Some(Destination {
filter_fn: Some(_),
..
}),
..
}
)
})
.map(|rule| {
let dest = rule.destination.as_ref().unwrap();
Expand Down

0 comments on commit dce9511

Please sign in to comment.