Derive Copy and Clone for zebra-consensus errors (#2664)

Co-authored-by: Marek <mail@marek.onl>
This commit is contained in:
teor 2021-08-25 08:56:11 +10:00 committed by GitHub
parent 047576273c
commit 81f2ceef80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ use thiserror::Error;
use crate::BoxError;
#[derive(Error, Debug, PartialEq)]
#[derive(Error, Copy, Clone, Debug, PartialEq)]
pub enum SubsidyError {
#[error("no coinbase transaction in block")]
NoCoinbase,
@ -18,7 +18,7 @@ pub enum SubsidyError {
FoundersRewardNotFound,
}
#[derive(Error, Debug, PartialEq)]
#[derive(Error, Clone, Debug, PartialEq)]
pub enum TransactionError {
#[error("first transaction must be coinbase")]
CoinbasePosition,
@ -108,7 +108,7 @@ impl From<SubsidyError> for BlockError {
}
}
#[derive(Error, Debug, PartialEq)]
#[derive(Error, Clone, Debug, PartialEq)]
pub enum BlockError {
#[error("block contains invalid transactions")]
Transaction(#[from] TransactionError),

View File

@ -24,7 +24,7 @@ use zebra_chain::{
transparent,
};
#[derive(Debug, Display, Error, PartialEq)]
#[derive(Copy, Clone, Debug, Display, Error, PartialEq)]
#[non_exhaustive]
/// An Error type representing the error codes returned from zcash_script.
pub enum Error {