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.
next_route
TestRouter
1 parent 9cfd5f9 commit 091da51Copy full SHA for 091da51
lightning/src/util/test_utils.rs
@@ -114,11 +114,12 @@ impl<'a> Router for TestRouter<'a> {
114
fn notify_payment_probe_failed(&self, _path: &[&RouteHop], _short_channel_id: u64) {}
115
}
116
117
-#[cfg(feature = "std")] // If we put this on the `if`, we get "attributes are not yet allowed on `if` expressions" on 1.41.1
118
impl<'a> Drop for TestRouter<'a> {
119
fn drop(&mut self) {
120
- if std::thread::panicking() {
121
- return;
+ #[cfg(feature = "std")] {
+ if std::thread::panicking() {
+ return;
122
+ }
123
124
assert!(self.next_routes.lock().unwrap().is_empty());
125
0 commit comments