Skip to content

Commit fb67e9d

Browse files
f max_by_key
1 parent 17d92fb commit fb67e9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/onion_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ pub(crate) fn set_max_path_length(
340340
.blinded_route_hints()
341341
.iter()
342342
.map(|(_, path)| path)
343-
.max_by(|path_a, path_b| path_a.serialized_length().cmp(&path_b.serialized_length()))
343+
.max_by_key(|path| path.serialized_length())
344344
.map(|largest_path| {
345345
let blinded_tail = BlindedTailHopIter {
346346
hops: largest_path.blinded_hops.iter(),

0 commit comments

Comments
 (0)