Merge rust-bitcoin/rust-bitcoin#3879: Remove Copy from `PushBytesError`

0870cd1660 Remove Copy from PushBytesError (Tobin C. Harding)

Pull request description:

  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`.

ACKs for top commit:
  apoelstra:
    ACK 0870cd1660edd21739cc94075e4b3a1c7f1a7d15; successfully ran local tests; lgtm

Tree-SHA512: c71db5de634dfe2bd76336e5c31fab496f2a472a8dd164034233544c15bd89c84ff986e476fa9b7b05d01aa5332dd4bc93f63a93bf7a21e9a0ec67fc145739b2
This commit is contained in:
merge-script 2025-01-08 19:03:12 +00:00
commit 31a5e71d57
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 2 additions and 2 deletions

View File

@ -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,