@@ -26,13 +26,13 @@ pub enum RpcErrorKind {
2626 NullResp ,
2727
2828 /// Rpc server returned an unsupported feature.
29- #[ error( "unsupported feature: {0 }" ) ]
30- UnsupportedFeature ( String ) ,
29+ #[ error( "unsupported feature: {message }" ) ]
30+ UnsupportedFeature { message : String } ,
3131
3232 /// Returned when a local pre-processing step fails. This allows custom
3333 /// errors from local signers or request pre-processors.
34- #[ error( "local usage error: {0 }" ) ]
35- InternalError ( String ) ,
34+ #[ error( "local usage error: {message }" ) ]
35+ InternalError { message : String } ,
3636
3737 /// JSON serialization error.
3838 #[ error( "serialization error: {message}" ) ]
@@ -327,10 +327,12 @@ fn to_engine_rpc_error_kind(err: &AlloyRpcError<TransportErrorKind>) -> RpcError
327327 data : err. data . as_ref ( ) . map ( |data| data. to_string ( ) ) ,
328328 } ) ,
329329 AlloyRpcError :: NullResp => RpcErrorKind :: NullResp ,
330- AlloyRpcError :: UnsupportedFeature ( feature) => {
331- RpcErrorKind :: UnsupportedFeature ( feature. to_string ( ) )
332- }
333- AlloyRpcError :: LocalUsageError ( err) => RpcErrorKind :: InternalError ( err. to_string ( ) ) ,
330+ AlloyRpcError :: UnsupportedFeature ( feature) => RpcErrorKind :: UnsupportedFeature {
331+ message : feature. to_string ( ) ,
332+ } ,
333+ AlloyRpcError :: LocalUsageError ( err) => RpcErrorKind :: InternalError {
334+ message : err. to_string ( ) ,
335+ } ,
334336 AlloyRpcError :: SerError ( err) => RpcErrorKind :: SerError {
335337 message : err. to_string ( ) ,
336338 } ,
@@ -465,4 +467,3 @@ impl From<TwmqError> for EngineError {
465467 }
466468 }
467469}
468-
0 commit comments