cfg: replace std feature gate alloc imports with extern crate alloc (#10861)

This commit is contained in:
Thomas Coratger
2024-09-13 18:01:12 +02:00
committed by GitHub
parent 6fc81f2b70
commit 47d188cb8e
54 changed files with 39 additions and 163 deletions

View File

@ -1,9 +1,6 @@
//! Chain specification for the Base Mainnet network.
#[cfg(not(feature = "std"))]
use alloc::sync::Arc;
#[cfg(feature = "std")]
use std::sync::Arc;
use alloy_chains::Chain;
use alloy_primitives::{b256, U256};

View File

@ -1,9 +1,6 @@
//! Chain specification for the Base Sepolia testnet network.
#[cfg(not(feature = "std"))]
use alloc::sync::Arc;
#[cfg(feature = "std")]
use std::sync::Arc;
use alloy_chains::Chain;
use alloy_primitives::{b256, U256};

View File

@ -1,9 +1,6 @@
//! Chain specification in dev mode for custom chain.
#[cfg(not(feature = "std"))]
use alloc::sync::Arc;
#[cfg(feature = "std")]
use std::sync::Arc;
use alloy_chains::Chain;
use alloy_primitives::U256;

View File

@ -7,7 +7,6 @@
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#[cfg(not(feature = "std"))]
extern crate alloc;
pub mod constants;

View File

@ -1,9 +1,6 @@
//! Chain specification for the Optimism Mainnet network.
#[cfg(not(feature = "std"))]
use alloc::sync::Arc;
#[cfg(feature = "std")]
use std::sync::Arc;
use alloy_chains::Chain;
use alloy_primitives::{b256, U256};

View File

@ -1,9 +1,6 @@
//! Chain specification for the Optimism Sepolia testnet network.
#[cfg(not(feature = "std"))]
use alloc::sync::Arc;
#[cfg(feature = "std")]
use std::sync::Arc;
use alloy_chains::{Chain, NamedChain};
use alloy_primitives::{b256, U256};