From 0870cd1660edd21739cc94075e4b3a1c7f1a7d15 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 8 Jan 2025 10:30:03 +1100 Subject: [PATCH] Remove Copy from PushBytesError The `PushBytesError` is the only error type in the codebase to derive `Copy`. Without thinking too hard this is unusual - remove it. Thinking a bit harder it makes the code less maintainable because we must commit to implementing `Copy`. --- bitcoin/src/blockdata/script/push_bytes.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitcoin/src/blockdata/script/push_bytes.rs b/bitcoin/src/blockdata/script/push_bytes.rs index 59f651314..bae7902b3 100644 --- a/bitcoin/src/blockdata/script/push_bytes.rs +++ b/bitcoin/src/blockdata/script/push_bytes.rs @@ -413,7 +413,7 @@ mod error { /// Error returned on attempt to create too large `PushBytes`. #[allow(unused)] - #[derive(Debug, Clone, Copy, PartialEq, Eq)] + #[derive(Debug, Clone, PartialEq, Eq)] pub struct PushBytesError { never: core::convert::Infallible, } @@ -435,7 +435,7 @@ mod error { use core::fmt; /// Error returned on attempt to create too large `PushBytes`. - #[derive(Debug, Clone, Copy, PartialEq, Eq)] + #[derive(Debug, Clone, PartialEq, Eq)] pub struct PushBytesError { /// How long the input was. pub(super) len: usize,