Skip to content

Commit

Permalink
Fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Tibo-lg committed Sep 7, 2023
1 parent 5ab0767 commit e9cf8e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dlc/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ pub(crate) fn redeem_script_to_script_sig(redeem: &Script) -> Script {
/// Sorts the given inputs in following the order of the ids.
pub(crate) fn order_by_serial_ids<T>(inputs: Vec<T>, ids: &[u64]) -> Vec<T> {
debug_assert!(inputs.len() == ids.len());
let mut combined: Vec<(&u64, T)> = ids.iter().zip(inputs.into_iter()).collect();
let mut combined: Vec<(&u64, T)> = ids.iter().zip(inputs).collect();
combined.sort_by(|a, b| a.0.partial_cmp(b.0).unwrap());
combined.into_iter().map(|x| x.1).collect()
}
Expand Down

0 comments on commit e9cf8e8

Please sign in to comment.