From 07c4f760523b7a196bf160f585c2b437dea5b532 Mon Sep 17 00:00:00 2001 From: yancy Date: Thu, 22 May 2025 15:44:00 -0500 Subject: [PATCH] Add comparison traits to InputWeightPrediction * Partial Eq is added to Enable symmetric and transitive comparison. * Eq is added to enable reflexive comparison. --- bitcoin/src/blockdata/transaction.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoin/src/blockdata/transaction.rs b/bitcoin/src/blockdata/transaction.rs index 9cc1c5939..b521f2cda 100644 --- a/bitcoin/src/blockdata/transaction.rs +++ b/bitcoin/src/blockdata/transaction.rs @@ -928,7 +928,7 @@ pub const fn predict_weight_from_slices( /// This helper type collects information about an input to be used in [`predict_weight`] function. /// It can only be created using the [`new`](InputWeightPrediction::new) function or using other /// associated constants/methods. -#[derive(Copy, Clone, Debug)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct InputWeightPrediction { script_size: usize, witness_size: usize,