From 4a8a7b8eea3c8e552feaec3b88603002368e83d0 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 11 Jan 2024 09:18:53 +1100 Subject: [PATCH] Box the transactions in CombineError clippy warns of big error variant, box the transactions. --- src/v0/error.rs | 4 ++-- src/v0/map/global.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/v0/error.rs b/src/v0/error.rs index 8f9635c..a29f27f 100644 --- a/src/v0/error.rs +++ b/src/v0/error.rs @@ -309,9 +309,9 @@ pub enum CombineError { /// Attempting to combine with a PSBT describing a different unsigned transaction. UnexpectedUnsignedTx { /// Expected transaction. - expected: Transaction, + expected: Box, /// Actual transaction. - actual: Transaction, + actual: Box, }, /// Global extended public key has inconsistent key sources. InconsistentKeySources(InconsistentKeySourcesError), diff --git a/src/v0/map/global.rs b/src/v0/map/global.rs index e98637c..740385b 100644 --- a/src/v0/map/global.rs +++ b/src/v0/map/global.rs @@ -235,8 +235,8 @@ impl Global { pub fn combine(&mut self, other: Self) -> Result<(), CombineError> { if self.unsigned_tx != other.unsigned_tx { return Err(CombineError::UnexpectedUnsignedTx { - expected: self.unsigned_tx.clone(), - actual: other.unsigned_tx, + expected: Box::new(self.unsigned_tx.clone()), + actual: Box::new(other.unsigned_tx), }); }