Skip to content

Commit

Permalink
remove unnecessary clone in BatchLogger
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Lattuada <andrea.lattuada@inf.ethz.ch>
  • Loading branch information
utaal committed Jan 4, 2018
1 parent d3fce80 commit a79c493
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ impl<S: Clone, E: Clone, P> BatchLogger<S, E, P> where P: EventPusher<Product<Ro
match logger_batch {
LoggerBatch::Logs(evs) => {
if let Some(frontier) = self.frontier {
self.event_pusher.push(Event::Messages(frontier, evs.clone()));
let &(last_ts, _, _) = evs.last().unwrap();
self.event_pusher.push(Event::Messages(frontier, evs));
let new_frontier = RootTimestamp::new(last_ts);
self.event_pusher.push(Event::Progress(vec![(new_frontier, 1), (frontier, -1)]));
self.frontier = Some(new_frontier);
Expand Down

0 comments on commit a79c493

Please sign in to comment.