Derive Clone on consensus errors

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
This commit is contained in:
Tobin C. Harding 2025-01-08 10:34:47 +11:00
parent 4ade08c755
commit 2f91092d77
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 2 additions and 2 deletions

View File

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