mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: rm redundant std cfgs (#13733)
This commit is contained in:
@ -11,7 +11,10 @@
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::{boxed::Box, string::String};
|
||||
use alloc::{
|
||||
boxed::Box,
|
||||
string::{String, ToString},
|
||||
};
|
||||
use alloy_eips::BlockNumHash;
|
||||
use alloy_primitives::B256;
|
||||
use reth_consensus::ConsensusError;
|
||||
@ -134,7 +137,6 @@ pub enum BlockExecutionError {
|
||||
impl BlockExecutionError {
|
||||
/// Create a new [`BlockExecutionError::Internal`] variant, containing a
|
||||
/// [`InternalBlockExecutionError::Other`] error.
|
||||
#[cfg(feature = "std")]
|
||||
pub fn other<E>(error: E) -> Self
|
||||
where
|
||||
E: core::error::Error + Send + Sync + 'static,
|
||||
@ -144,8 +146,7 @@ impl BlockExecutionError {
|
||||
|
||||
/// Create a new [`BlockExecutionError::Internal`] variant, containing a
|
||||
/// [`InternalBlockExecutionError::Other`] error with the given message.
|
||||
#[cfg(feature = "std")]
|
||||
pub fn msg(msg: impl std::fmt::Display) -> Self {
|
||||
pub fn msg(msg: impl core::fmt::Display) -> Self {
|
||||
Self::Internal(InternalBlockExecutionError::msg(msg))
|
||||
}
|
||||
|
||||
@ -195,7 +196,6 @@ pub enum InternalBlockExecutionError {
|
||||
|
||||
impl InternalBlockExecutionError {
|
||||
/// Create a new [`InternalBlockExecutionError::Other`] variant.
|
||||
#[cfg(feature = "std")]
|
||||
pub fn other<E>(error: E) -> Self
|
||||
where
|
||||
E: core::error::Error + Send + Sync + 'static,
|
||||
@ -204,8 +204,7 @@ impl InternalBlockExecutionError {
|
||||
}
|
||||
|
||||
/// Create a new [`InternalBlockExecutionError::Other`] from a given message.
|
||||
#[cfg(feature = "std")]
|
||||
pub fn msg(msg: impl std::fmt::Display) -> Self {
|
||||
pub fn msg(msg: impl core::fmt::Display) -> Self {
|
||||
Self::Other(msg.to_string().into())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user