Skip to content

Commit 6bfb3bb

Browse files
authored
chore: rm redundant std cfgs (paradigmxyz#13733)
1 parent 8f2ecc4 commit 6bfb3bb

File tree

1 file changed

+6
-7
lines changed
  • crates/evm/execution-errors/src

1 file changed

+6
-7
lines changed

crates/evm/execution-errors/src/lib.rs

+6-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111

1212
extern crate alloc;
1313

14-
use alloc::{boxed::Box, string::String};
14+
use alloc::{
15+
boxed::Box,
16+
string::{String, ToString},
17+
};
1518
use alloy_eips::BlockNumHash;
1619
use alloy_primitives::B256;
1720
use reth_consensus::ConsensusError;
@@ -134,7 +137,6 @@ pub enum BlockExecutionError {
134137
impl BlockExecutionError {
135138
/// Create a new [`BlockExecutionError::Internal`] variant, containing a
136139
/// [`InternalBlockExecutionError::Other`] error.
137-
#[cfg(feature = "std")]
138140
pub fn other<E>(error: E) -> Self
139141
where
140142
E: core::error::Error + Send + Sync + 'static,
@@ -144,8 +146,7 @@ impl BlockExecutionError {
144146

145147
/// Create a new [`BlockExecutionError::Internal`] variant, containing a
146148
/// [`InternalBlockExecutionError::Other`] error with the given message.
147-
#[cfg(feature = "std")]
148-
pub fn msg(msg: impl std::fmt::Display) -> Self {
149+
pub fn msg(msg: impl core::fmt::Display) -> Self {
149150
Self::Internal(InternalBlockExecutionError::msg(msg))
150151
}
151152

@@ -195,7 +196,6 @@ pub enum InternalBlockExecutionError {
195196

196197
impl InternalBlockExecutionError {
197198
/// Create a new [`InternalBlockExecutionError::Other`] variant.
198-
#[cfg(feature = "std")]
199199
pub fn other<E>(error: E) -> Self
200200
where
201201
E: core::error::Error + Send + Sync + 'static,
@@ -204,8 +204,7 @@ impl InternalBlockExecutionError {
204204
}
205205

206206
/// Create a new [`InternalBlockExecutionError::Other`] from a given message.
207-
#[cfg(feature = "std")]
208-
pub fn msg(msg: impl std::fmt::Display) -> Self {
207+
pub fn msg(msg: impl core::fmt::Display) -> Self {
209208
Self::Other(msg.to_string().into())
210209
}
211210
}

0 commit comments

Comments
 (0)