Merge rust-bitcoin/rust-bitcoin#3880: Derive `Clone`on consensus errors

2f91092d77 Derive Clone on consensus errors (Tobin C. Harding)

Pull request description:

  All error types in the repo use either [0]:

  - `#[derive(Debug, Clone, PartialEq, Eq)]``
  - `#[derive(Debug)]`

  However the `consensus` error types do not have `Clone` derived.

  Derive `Clone` on `consensus::ParseError` and `consensus::Error`.

  [0] Excluding `PushBytesError`, fixed in #3879

ACKs for top commit:
  apoelstra:
    ACK 2f91092d773e1618314b62c9e3eae17c08e1f5ad; successfully ran local tests; lgtm

Tree-SHA512: 2cae6faae97b63de311538c33eb7d1914330672744ca073bc6ea5c11ebd40a40ff3de9a38f1f5b101ff27798416d685a708599c298a6f82d7f5804575c2cb2c1
This commit is contained in:
merge-script 2025-01-08 20:27:32 +00:00
commit 72aceb32db
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ use internals::write_err;
use super::IterReader; use super::IterReader;
/// Error deserializing from a slice. /// Error deserializing from a slice.
#[derive(Debug, PartialEq, Eq)] #[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive] #[non_exhaustive]
pub enum DeserializeError { pub enum DeserializeError {
/// Error parsing encoded object. /// Error parsing encoded object.
@ -149,7 +149,7 @@ impl From<ParseError> for Error {
} }
/// Encoding is invalid. /// Encoding is invalid.
#[derive(Debug, PartialEq, Eq)] #[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive] #[non_exhaustive]
pub enum ParseError { pub enum ParseError {
/// Missing data (early end of file or slice too short). /// Missing data (early end of file or slice too short).