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.