From 1db907f47a61df6dda776e1356e7bec46248a6be Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 24 Jul 2019 17:21:10 -0400 Subject: [PATCH] Fix unused variable introduced in my changes in bdbf5666a9d693b9bf1 The original was written by Tamas, but I made one small tweak and broke the warning-free-ness of it. --- src/ln/onion_utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ln/onion_utils.rs b/src/ln/onion_utils.rs index 11b279073..6ca8811e4 100644 --- a/src/ln/onion_utils.rs +++ b/src/ln/onion_utils.rs @@ -114,7 +114,7 @@ pub(super) fn build_onion_payloads(route: &Route, starting_htlc_offset: u32) -> let mut last_short_channel_id = 0; let mut res: Vec = Vec::with_capacity(route.hops.len()); - for (idx, hop) in route.hops.iter().enumerate().rev() { + for hop in route.hops.iter().rev() { // First hop gets special values so that it can check, on receipt, that everything is // exactly as it should be (and the next hop isn't trying to probe to find out if we're // the intended recipient). -- 2.39.5