Skip to content

Commit

Permalink
f Use non-Arc Event
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Dec 13, 2022
1 parent 61981ad commit a68fa60
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ impl LdkLite {
/// Blocks until the next event is available.
///
/// Note: this will always return the same event until handling is confirmed via [`LdkLite::event_handled`].
pub fn next_event(&self) -> Arc<Event> {
pub fn next_event(&self) -> Event {
self.event_queue.next_event()
}

Expand Down
2 changes: 1 addition & 1 deletion src/tests/functional_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ fn channel_full_cycle() {

expect_event!(node_a, ChannelReady);

let channel_id = match *node_b.next_event() {
let channel_id = match node_b.next_event() {
ref e @ Event::ChannelReady { channel_id, .. } => {
println!("{} got event {:?}", std::stringify!(node_b), e);
node_b.event_handled();
Expand Down
2 changes: 1 addition & 1 deletion src/tests/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::sync::atomic::{AtomicBool, Ordering};

macro_rules! expect_event {
($node: expr, $event_type: ident) => {{
match *$node.next_event() {
match $node.next_event() {
ref e @ Event::$event_type { .. } => {
println!("{} got event {:?}", std::stringify!($node), e);
$node.event_handled();
Expand Down

0 comments on commit a68fa60

Please sign in to comment.