mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: implement deref and derefMut for Requests (#8816)
This commit is contained in:
@ -5,6 +5,7 @@ use alloy_eips::eip7685::{Decodable7685, Encodable7685};
|
||||
use alloy_rlp::{Decodable, Encodable};
|
||||
use reth_codecs::{main_codec, Compact};
|
||||
use revm_primitives::Bytes;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
/// A list of EIP-7685 requests.
|
||||
#[main_codec]
|
||||
@ -53,3 +54,17 @@ impl Decodable for Requests {
|
||||
.map(Self)?)
|
||||
}
|
||||
}
|
||||
|
||||
impl Deref for Requests {
|
||||
type Target = Vec<Request>;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl DerefMut for Requests {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user