mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
cfg: replace std feature gate alloc imports with extern crate alloc (#10861)
This commit is contained in:
@ -1,14 +1,9 @@
|
||||
#[cfg(feature = "std")]
|
||||
use std::{fmt, fmt::Display, str::FromStr, string::String};
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::{
|
||||
boxed::Box,
|
||||
format,
|
||||
string::{String, ToString},
|
||||
vec::Vec,
|
||||
};
|
||||
#[cfg(not(feature = "std"))]
|
||||
use core::{
|
||||
fmt,
|
||||
fmt::{Debug, Display},
|
||||
|
||||
@ -9,7 +9,6 @@
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
extern crate alloc;
|
||||
|
||||
/// Database error
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
use reth_fs_util::FsPathError;
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::string::{String, ToString};
|
||||
use reth_fs_util::FsPathError;
|
||||
|
||||
/// Storage lock error.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, derive_more::Display)]
|
||||
|
||||
@ -6,7 +6,6 @@ use reth_primitives::{BlockHashOrNumber, GotExpected, StaticFileSegment, TxHashO
|
||||
#[cfg(feature = "std")]
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use alloc::{boxed::Box, string::String};
|
||||
|
||||
/// Provider result type.
|
||||
|
||||
Reference in New Issue
Block a user