mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(primitives, ethereum-forks): replace std feature gate alloc imports (#10945)
This commit is contained in:
@ -13,7 +13,8 @@ use rustc_hash::FxHashMap;
|
||||
use std::collections::hash_map::Entry;
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::{boxed::Box, collections::btree_map::Entry, vec::Vec};
|
||||
use alloc::collections::btree_map::Entry;
|
||||
use alloc::{boxed::Box, vec::Vec};
|
||||
|
||||
/// Generic trait over a set of ordered hardforks
|
||||
pub trait Hardforks: Default + Clone {
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
use crate::{Address, Transaction, TransactionSigned, TxKind, U256};
|
||||
use revm_primitives::{AuthorizationList, TxEnv};
|
||||
|
||||
#[cfg(all(not(feature = "std"), feature = "optimism"))]
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Implements behaviour to fill a [`TxEnv`] from another transaction.
|
||||
pub trait FillTxEnv {
|
||||
/// Fills [`TxEnv`] with an [`Address`] and transaction.
|
||||
@ -14,7 +11,7 @@ impl FillTxEnv for TransactionSigned {
|
||||
fn fill_tx_env(&self, tx_env: &mut TxEnv, sender: Address) {
|
||||
#[cfg(feature = "optimism")]
|
||||
let envelope = {
|
||||
let mut envelope = Vec::with_capacity(self.length_without_header());
|
||||
let mut envelope = alloc::vec::Vec::with_capacity(self.length_without_header());
|
||||
self.encode_enveloped(&mut envelope);
|
||||
envelope
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user