Skip to content

Commit

Permalink
Box the transactions in CombineError
Browse files Browse the repository at this point in the history
clippy warns of big error variant, box the transactions.
  • Loading branch information
tcharding committed Jan 10, 2024
1 parent 8f6e9df commit 4a8a7b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/v0/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Transaction>,
/// Actual transaction.
actual: Transaction,
actual: Box<Transaction>,
},
/// Global extended public key has inconsistent key sources.
InconsistentKeySources(InconsistentKeySourcesError),
Expand Down
4 changes: 2 additions & 2 deletions src/v0/map/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
});
}

Expand Down

0 comments on commit 4a8a7b8

Please sign in to comment.