From cb0f1c3435c99da08737fac078272880f2e242f8 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Thu, 14 Jun 2018 17:28:22 +0200 Subject: [PATCH] Fix nightly regression due to stabilization of Iterator::flatten, see https://github.com/rust-lang/rust/pull/51511 --- src/payment_request.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/payment_request.rs b/src/payment_request.rs index 614e461..25029c2 100644 --- a/src/payment_request.rs +++ b/src/payment_request.rs @@ -198,14 +198,14 @@ impl PaymentRequest { /// Return the extra routing info. pub fn routing_info(&self) -> Vec { - self.tags - .iter() - .filter_map(|v| match *v { - Tag::RoutingInfo { ref path } => Some(path.to_owned()), - _ => None, - }) - .flatten() - .collect_vec() + Itertools::flatten( + self.tags + .iter() + .filter_map(|v| match *v { + Tag::RoutingInfo { ref path } => Some(path.to_owned()), + _ => None, + }) + ).collect_vec() } /// Return the min_final_cltv_expiry if any.