Skip to content

Commit 8c383de

Browse files
committed
A couple more collapsible_matchs in a file I expect to go away
Signed-off-by: Jesse Szwedko <[email protected]>
1 parent dbd61ae commit 8c383de

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/mapping/query/function/split.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ impl SplitFn {
2323
}
2424

2525
impl Function for SplitFn {
26+
#[allow(clippy::collapsible_match)] // I expect this file to be going away shortly
2627
fn execute(&self, ctx: &Event) -> Result<QueryValue> {
2728
let string = {
2829
let bytes = required_value!(ctx, self.path, Value::Bytes(v) => v);
@@ -71,10 +72,7 @@ impl Function for SplitFn {
7172
},
7273
Parameter {
7374
keyword: "pattern",
74-
accepts: |v| {
75-
matches!(v, QueryValue::Value(Value::Bytes(_))
76-
| QueryValue::Regex(_))
77-
},
75+
accepts: |v| matches!(v, QueryValue::Value(Value::Bytes(_)) | QueryValue::Regex(_)),
7876
required: true,
7977
},
8078
Parameter {

0 commit comments

Comments
 (0)