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:
commit
72aceb32db
|
@ -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).
|
||||
|
|
Loading…
Reference in New Issue