Skip to content

Commit

Permalink
fmt: sort derives (alloy-rs#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored and ben186 committed Jul 27, 2024
1 parent 2ea4104 commit eb435ab
Show file tree
Hide file tree
Showing 95 changed files with 246 additions and 246 deletions.
2 changes: 1 addition & 1 deletion crates/consensus/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub const EMPTY_ROOT_HASH: B256 =
b256!("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421");

/// Ethereum Block header
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct Header {
/// The Keccak 256-bit hash of the parent
/// block’s header, in its entirety; formally Hp.
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/src/receipt/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use alloy_rlp::{Decodable, Encodable};
/// Transaction receipt payloads are specified in their respective EIPs.
///
/// [EIP-2718]: https://eips.ethereum.org/EIPS/eip-2718
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Clone, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct AnyReceiptEnvelope<T = Log> {
/// The receipt envelope.
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/src/receipt/envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use alloy_rlp::{length_of_length, BufMut, Decodable, Encodable};
/// Transaction receipt payloads are specified in their respective EIPs.
///
/// [EIP-2718]: https://eips.ethereum.org/EIPS/eip-2718
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Clone, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(tag = "type"))]
#[non_exhaustive]
Expand Down
4 changes: 2 additions & 2 deletions crates/consensus/src/receipt/receipts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use alloy_rlp::{length_of_length, BufMut, Decodable, Encodable};
use alloc::vec::Vec;

/// Receipt containing result of transaction execution.
#[derive(Clone, Debug, PartialEq, Eq, Default)]
#[derive(Clone, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(any(test, feature = "arbitrary"), derive(arbitrary::Arbitrary))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
Expand Down Expand Up @@ -61,7 +61,7 @@ impl TxReceipt for Receipt {
/// receipt, similar to [`Sealed`].
///
/// [`Sealed`]: crate::sealed::Sealed
#[derive(Clone, Debug, PartialEq, Eq, Default)]
#[derive(Clone, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub struct ReceiptWithBloom<T = Log> {
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/src/sealed.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use alloy_primitives::B256;

#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
/// A consensus hashable item, with its memoized hash.
///
/// We do not implement
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/src/transaction/eip1559.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use core::mem;
use alloc::vec::Vec;

/// A transaction with a priority fee ([EIP-1559](https://eips.ethereum.org/EIPS/eip-1559)).
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub struct TxEip1559 {
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/src/transaction/eip2930.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use core::mem;
use alloc::vec::Vec;

/// Transaction with an [`AccessList`] ([EIP-2930](https://eips.ethereum.org/EIPS/eip-2930)).
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub struct TxEip2930 {
Expand Down
8 changes: 4 additions & 4 deletions crates/consensus/src/transaction/eip4844.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub enum BlobTransactionValidationError {
/// It can either be a standalone transaction, mainly seen when retrieving historical transactions,
/// or a transaction with a sidecar, which is used when submitting a transaction to the network and
/// when receiving and sending transactions during the gossip stage.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
#[cfg_attr(feature = "serde", serde(untagged))]
pub enum TxEip4844Variant {
Expand Down Expand Up @@ -321,7 +321,7 @@ impl SignableTransaction<Signature> for TxEip4844Variant {
/// [EIP-4844 Blob Transaction](https://eips.ethereum.org/EIPS/eip-4844#blob-transaction)
///
/// A transaction with blob hashes and max blob fee. It does not have the Blob sidecar.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub struct TxEip4844 {
Expand Down Expand Up @@ -762,7 +762,7 @@ impl Decodable for TxEip4844 {
/// This is defined in [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844#networking) as an element
/// of a `PooledTransactions` response, and is also used as the format for sending raw transactions
/// through the network (eth_sendRawTransaction/eth_sendTransaction).
#[derive(Debug, Default, Clone, PartialEq, Eq, Hash)]
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub struct TxEip4844WithSidecar {
Expand Down Expand Up @@ -960,7 +960,7 @@ impl Transaction for TxEip4844WithSidecar {
}

/// This represents a set of blobs, and its corresponding commitments and proofs.
#[derive(Debug, Default, Clone, PartialEq, Eq, Hash)]
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)]
#[repr(C)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct BlobTransactionSidecar {
Expand Down
6 changes: 3 additions & 3 deletions crates/consensus/src/transaction/eip4844/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use core::cmp;
/// A builder for creating a [`BlobTransactionSidecar`].
///
/// [`BlobTransactionSidecar`]: crate::BlobTransactionSidecar
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct PartialSidecar {
/// The blobs in the sidecar.
blobs: Vec<Blob>,
Expand Down Expand Up @@ -178,7 +178,7 @@ pub trait SidecarCoder {
/// - The first byte of every 32-byte word.
/// - The right padding on the header word containing the data length.
/// - Any right padding on the last word for each piece of data.
#[derive(Debug, Copy, Clone, Default)]
#[derive(Clone, Copy, Debug, Default)]
#[non_exhaustive]
pub struct SimpleCoder;

Expand Down Expand Up @@ -255,7 +255,7 @@ impl SidecarCoder for SimpleCoder {
/// until all data is ready.
///
/// [`BlobTransactionSidecar`]: crate::BlobTransactionSidecar
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct SidecarBuilder<T = SimpleCoder> {
/// The blob array we will code data into
inner: PartialSidecar,
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/src/transaction/eip4844/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub const fn minimum_fe(data: &[u8]) -> usize {
}

/// A wrapper for a slice of bytes that is a whole, valid field element.
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub struct WholeFe<'a>(&'a [u8]);

impl<'a> WholeFe<'a> {
Expand Down
4 changes: 2 additions & 2 deletions crates/consensus/src/transaction/envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use core::mem;
/// [2930]: https://eips.ethereum.org/EIPS/eip-2930
/// [4844]: https://eips.ethereum.org/EIPS/eip-4844
#[repr(u8)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, PartialOrd, Ord, Hash)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum TxType {
/// Legacy transaction type.
Legacy = 0,
Expand Down Expand Up @@ -61,7 +61,7 @@ impl TryFrom<u8> for TxType {
/// flag.
///
/// [EIP-2718]: https://eips.ethereum.org/EIPS/eip-2718
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Clone, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(tag = "type"))]
#[non_exhaustive]
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/src/transaction/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use core::mem;
use alloc::vec::Vec;

/// Legacy transaction.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub struct TxLegacy {
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/src/transaction/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use alloy_primitives::TxKind;
/// 2. EIP2930 (state access lists) [`TxEip2930`]
/// 3. EIP1559 [`TxEip1559`]
/// 4. EIP4844 [`TxEip4844Variant`]
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(tag = "type"))]
pub enum TypedTransaction {
Expand Down
2 changes: 1 addition & 1 deletion crates/contract/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use alloy_primitives::{Address, Selector};
use std::collections::{BTreeMap, HashMap};

/// A smart contract interface.
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub struct Interface {
abi: JsonAbi,
functions: HashMap<Selector, (String, usize)>,
Expand Down
4 changes: 2 additions & 2 deletions crates/eip7547/src/summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Serialize for InclusionListStatusV1 {
///
/// - `address` : `DATA`, 20 Bytes
/// - `nonce` : `QUANTITY`, 64 Bits
#[derive(Copy, Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct InclusionListSummaryEntryV1 {
/// The address of the inclusion list entry.
Expand All @@ -104,7 +104,7 @@ impl fmt::Display for InclusionListSummaryEntryV1 {
/// - `proposer_index`: `QUANTITY`, 64 Bits
/// - `parent_hash`: `DATA`, 32 Bytes
/// - `summary`: `Array of InclusionListSummaryEntryV1`, Array of entries that must be satisfied.
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct InclusionListSummaryV1 {
/// The slot of the inclusion list summary.
Expand Down
2 changes: 1 addition & 1 deletion crates/eips/src/eip1559/basefee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
};

/// BaseFeeParams contains the config parameters that control block base fee computation
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct BaseFeeParams {
/// The base_fee_max_change_denominator from EIP-1559
Expand Down
2 changes: 1 addition & 1 deletion crates/eips/src/eip2718.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const TX_TYPE_BYTE_MAX: u8 = 0x7f;
/// [EIP-2718] decoding errors.
///
/// [EIP-2718]: https://eips.ethereum.org/EIPS/eip-2718
#[derive(Debug, Copy, Clone)]
#[derive(Clone, Copy, Debug)]
pub enum Eip2718Error {
/// Rlp error from [`alloy_rlp`].
RlpError(alloy_rlp::Error),
Expand Down
6 changes: 3 additions & 3 deletions crates/eips/src/eip2930.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use core::mem;

/// A list of addresses and storage keys that the transaction plans to access.
/// Accesses outside the list are possible, but become more expensive.
#[derive(Clone, Debug, PartialEq, Eq, Hash, Default, RlpDecodable, RlpEncodable)]
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash, RlpDecodable, RlpEncodable)]
#[cfg_attr(
any(test, feature = "arbitrary"),
derive(proptest_derive::Arbitrary, arbitrary::Arbitrary)
Expand Down Expand Up @@ -42,7 +42,7 @@ impl AccessListItem {
}

/// AccessList as defined in EIP-2930
#[derive(Clone, Debug, PartialEq, Eq, Hash, Default, RlpDecodableWrapper, RlpEncodableWrapper)]
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash, RlpDecodableWrapper, RlpEncodableWrapper)]
#[cfg_attr(
any(test, feature = "arbitrary"),
derive(proptest_derive::Arbitrary, arbitrary::Arbitrary)
Expand Down Expand Up @@ -111,7 +111,7 @@ impl AccessList {
}

/// Access list with gas used appended.
#[derive(Clone, Debug, PartialEq, Eq, Default)]
#[derive(Clone, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub struct AccessListWithGasUsed {
Expand Down
2 changes: 1 addition & 1 deletion crates/eips/src/eip4844/env_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use c_kzg::KzgSettings;
use core::hash::{Hash, Hasher};

/// KZG settings.
#[derive(Debug, Clone, Default, Eq)]
#[derive(Clone, Debug, Default, Eq)]
pub enum EnvKzgSettings {
/// Default mainnet trusted setup.
#[default]
Expand Down
6 changes: 3 additions & 3 deletions crates/eips/src/eip4844/trusted_setup_points.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub const NUM_G1_POINTS: usize = 4096;
pub const NUM_G2_POINTS: usize = 65;

/// A newtype over list of G1 point from kzg trusted setup.
#[derive(Debug, Clone, PartialEq, AsRef, AsMut, Deref, DerefMut)]
#[derive(Clone, Debug, PartialEq, AsRef, AsMut, Deref, DerefMut)]
#[repr(transparent)]
pub struct G1Points(pub [[u8; BYTES_PER_G1_POINT]; NUM_G1_POINTS]);

Expand All @@ -25,7 +25,7 @@ impl Default for G1Points {
}

/// A newtype over list of G2 point from kzg trusted setup.
#[derive(Debug, Clone, Eq, PartialEq, AsRef, AsMut, Deref, DerefMut)]
#[derive(Clone, Debug, PartialEq, Eq, AsRef, AsMut, Deref, DerefMut)]
#[repr(transparent)]
pub struct G2Points(pub [[u8; BYTES_PER_G2_POINT]; NUM_G2_POINTS]);

Expand Down Expand Up @@ -100,7 +100,7 @@ pub fn parse_kzg_trusted_setup(
}

/// KZG custom Error types
#[derive(Debug, Clone, Copy)]
#[derive(Clone, Copy, Debug)]
pub enum KzgErrors {
/// Failed to get current directory.
FailedCurrentDirectory,
Expand Down
2 changes: 1 addition & 1 deletion crates/eips/src/eip4895.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use alloy_rlp::{RlpDecodable, RlpEncodable};
pub const GWEI_TO_WEI: u64 = 1_000_000_000;

/// Withdrawal represents a validator withdrawal from the consensus layer.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Default, Hash, RlpEncodable, RlpDecodable)]
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, RlpEncodable, RlpDecodable)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "ssz", derive(ssz_derive::Encode, ssz_derive::Decode))]
pub struct Withdrawal {
Expand Down
10 changes: 5 additions & 5 deletions crates/genesis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use alloy_serde::{
use serde::{Deserialize, Serialize};

/// The genesis block specification.
#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq)]
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase", default)]
pub struct Genesis {
/// The fork configuration for this network.
Expand Down Expand Up @@ -211,7 +211,7 @@ impl Genesis {
}

/// An account in the state of the genesis block.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Eq)]
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct GenesisAccount {
/// The nonce of the account at genesis.
Expand Down Expand Up @@ -271,7 +271,7 @@ impl GenesisAccount {
/// See [geth's `ChainConfig`
/// struct](https://github.com/ethereum/go-ethereum/blob/64dccf7aa411c5c7cd36090c3d9b9892945ae813/params/config.go#L349)
/// for the source of each field.
#[derive(Clone, Debug, Deserialize, Serialize, Default, PartialEq, Eq)]
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub struct ChainConfig {
/// The network's chain ID.
Expand Down Expand Up @@ -522,11 +522,11 @@ const fn mainnet_id() -> u64 {
}

/// Empty consensus configuration for proof-of-work networks.
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, Copy)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct EthashConfig {}

/// Consensus configuration for Clique.
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, Copy)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct CliqueConfig {
/// Number of seconds between blocks to enforce.
#[serde(default, skip_serializing_if = "Option::is_none")]
Expand Down
4 changes: 2 additions & 2 deletions crates/json-rpc/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use std::fmt::Display;
/// [`BTreeSet`]: std::collections::BTreeSet
/// [`HashMap`]: std::collections::HashMap
/// [`HashSet`]: std::collections::HashSet
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub enum Id {
/// A number.
Number(u64),
Expand Down Expand Up @@ -161,7 +161,7 @@ impl Id {
mod test {
use super::*;

#[derive(Deserialize, Serialize, Debug, PartialEq)]
#[derive(Debug, PartialEq, Serialize, Deserialize)]
struct TestCase {
id: Id,
}
Expand Down
4 changes: 2 additions & 2 deletions crates/json-rpc/src/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use serde::{

/// An ethereum-style notification, not to be confused with a JSON-RPC
/// notification.
#[derive(Debug, Clone, Deserialize, Serialize)]
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct EthNotification<T = Box<serde_json::value::RawValue>> {
/// The subscription ID.
pub subscription: U256,
Expand All @@ -18,7 +18,7 @@ pub struct EthNotification<T = Box<serde_json::value::RawValue>> {
/// An item received over an Ethereum pubsub transport. Ethereum pubsub uses a
/// non-standard JSON-RPC notification format. An item received over a pubsub
/// transport may be a JSON-RPC response or an Ethereum-style notification.
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub enum PubSubItem {
/// A [`Response`] to a JSON-RPC request.
Response(Response),
Expand Down
6 changes: 3 additions & 3 deletions crates/json-rpc/src/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{collections::HashSet, fmt, marker::PhantomData};

/// A [`RequestPacket`] is a [`SerializedRequest`] or a batch of serialized
/// request.
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub enum RequestPacket {
/// A single request.
Single(SerializedRequest),
Expand Down Expand Up @@ -105,7 +105,7 @@ impl RequestPacket {
}

/// A [`ResponsePacket`] is a [`Response`] or a batch of responses.
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
pub enum ResponsePacket<Payload = Box<RawValue>, ErrData = Box<RawValue>> {
/// A single response.
Single(Response<Payload, ErrData>),
Expand Down Expand Up @@ -278,7 +278,7 @@ impl<Payload, ErrData> ResponsePacket<Payload, ErrData> {
}

/// An Iterator over the [ErrorPayload]s in a [ResponsePacket].
#[derive(Debug, Clone)]
#[derive(Clone, Debug)]
enum ResponsePacketErrorsIter<'a, Payload, ErrData> {
Single(Option<&'a Response<Payload, ErrData>>),
Batch(std::slice::Iter<'a, Response<Payload, ErrData>>),
Expand Down
Loading

0 comments on commit eb435ab

Please sign in to comment.