Skip to content

Commit 2727669

Browse files
authored
Merge pull request #821 from jkczyz/2021-03-fix-build-warnings
Fix build warnings
2 parents 4894d52 + a571ecc commit 2727669

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/routing/router.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ pub fn get_route<L: Deref>(our_node_id: &PublicKey, network: &NetworkGraph, paye
946946
// TODO: this could also be optimized by also sorting by feerate_per_sat_routed,
947947
// so that the sender pays less fees overall. And also htlc_minimum_msat.
948948
cur_route.sort_by_key(|path| { path.hops.iter().map(|hop| hop.channel_fees.proportional_millionths as u64).sum::<u64>() });
949-
let mut expensive_payment_path = cur_route.first_mut().unwrap();
949+
let expensive_payment_path = cur_route.first_mut().unwrap();
950950
// We already dropped all the small channels above, meaning all the
951951
// remaining channels are larger than remaining overpaid_value_msat.
952952
// Thus, this can't be negative.
@@ -961,7 +961,7 @@ pub fn get_route<L: Deref>(our_node_id: &PublicKey, network: &NetworkGraph, paye
961961
// Step (8).
962962
// Select the best route by lowest total fee.
963963
drawn_routes.sort_by_key(|paths| paths.iter().map(|path| path.get_total_fee_paid_msat()).sum::<u64>());
964-
let mut selected_paths = Vec::<Vec::<RouteHop>>::new();
964+
let mut selected_paths = vec![];
965965
for payment_path in drawn_routes.first().unwrap() {
966966
selected_paths.push(payment_path.hops.iter().map(|payment_hop| payment_hop.route_hop.clone()).collect());
967967
}

0 commit comments

Comments
 (0)