We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e19897 commit 1512edbCopy full SHA for 1512edb
lightning/src/util/events.rs
@@ -27,6 +27,7 @@ use io;
27
use prelude::*;
28
use core::time::Duration;
29
use core::ops::Deref;
30
+use sync::Arc;
31
32
/// Some information provided on receipt of payment depends on whether the payment received is a
33
/// spontaneous payment or a "conventional" lightning payment that's paying an invoice.
@@ -569,3 +570,9 @@ impl<F> EventHandler for F where F: Fn(&Event) {
569
570
self(event)
571
}
572
573
+
574
+impl<T: EventHandler> EventHandler for Arc<T> {
575
+ fn handle_event(&self, event: &Event) {
576
+ self.deref().handle_event(event)
577
+ }
578
+}
0 commit comments