Skip to content

Commit

Permalink
clippy clippy joy joy
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Wahl <mwahl@wayfair.com>
  • Loading branch information
Matthias Wahl committed Feb 18, 2021
1 parent d1b90d0 commit 54faae5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tremor-pipeline/src/op/generic/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ impl Operator for Batch {
_state: &Value<'static>,
signal: &mut Event,
) -> Result<EventAndInsights> {
Ok(self.max_delay_ns.map_or_else(
|| EventAndInsights::default(),
|delay_ns| {
Ok(self
.max_delay_ns
.map_or_else(EventAndInsights::default, |delay_ns| {
if signal.ingest_ns - self.first_ns > delay_ns {
// We don't want to modify the original signal we clone it to
// create a new event.
Expand All @@ -187,8 +187,7 @@ impl Operator for Batch {
} else {
EventAndInsights::default()
}
},
))
}))
}
}

Expand Down

0 comments on commit 54faae5

Please sign in to comment.