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 afdb131 commit b0f1f5aCopy full SHA for b0f1f5a
lightning/src/util/events.rs
@@ -28,6 +28,7 @@ use io;
28
use prelude::*;
29
use core::time::Duration;
30
use core::ops::Deref;
31
+use sync::Arc;
32
33
/// Some information provided on receipt of payment depends on whether the payment received is a
34
/// spontaneous payment or a "conventional" lightning payment that's paying an invoice.
@@ -577,3 +578,9 @@ impl<F> EventHandler for F where F: Fn(&Event) {
577
578
self(event)
579
}
580
581
+
582
+impl<T: EventHandler> EventHandler for Arc<T> {
583
+ fn handle_event(&self, event: &Event) {
584
+ self.deref().handle_event(event)
585
+ }
586
+}
0 commit comments