Skip to content

Commit d2ab610

Browse files
committed
Use split_off instead of collecting in get_pending_events()
1 parent 66b8611 commit d2ab610

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning-liquidity/src/events.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl EventQueue {
8787
}
8888

8989
pub fn get_and_clear_pending_events(&self) -> Vec<Event> {
90-
self.queue.lock().unwrap().drain(..).collect()
90+
self.queue.lock().unwrap().split_off(0).into()
9191
}
9292
}
9393

0 commit comments

Comments
 (0)