reth_revm::interpreter::primitives::alloy_primitives::utils

Function box_try_new

pub fn box_try_new<T>(value: T) -> Result<Box<T>, TryReserveError>
Expand description

Allocates memory on the heap then places x into it, returning an error if the allocation fails.

Stable version of Box::try_new.