diff --git a/bolt-boost/Cargo.toml b/bolt-boost/Cargo.toml index c813a2aee..19fee1152 100644 --- a/bolt-boost/Cargo.toml +++ b/bolt-boost/Cargo.toml @@ -55,3 +55,7 @@ lazy_static = "1.5.0" # NOTE: we need this in order to play nice with Lighthouse types at version 5.3.0 ssz_compat = { version = "0.5", package = "ethereum_ssz" } types = { git = "https://github.com/sigp/lighthouse", tag = "v5.3.0" } + +[lints.clippy] +unnecessary_self_imports = "warn" +use_self = "warn" diff --git a/bolt-boost/src/error.rs b/bolt-boost/src/error.rs index e6d2b7014..c6031f8bb 100644 --- a/bolt-boost/src/error.rs +++ b/bolt-boost/src/error.rs @@ -12,9 +12,9 @@ pub enum PbsClientError { impl PbsClientError { pub fn status_code(&self) -> StatusCode { match self { - PbsClientError::NoResponse => StatusCode::SERVICE_UNAVAILABLE, - PbsClientError::NoPayload => StatusCode::BAD_GATEWAY, - PbsClientError::BadRequest => StatusCode::BAD_REQUEST, + Self::NoResponse => StatusCode::SERVICE_UNAVAILABLE, + Self::NoPayload => StatusCode::BAD_GATEWAY, + Self::BadRequest => StatusCode::BAD_REQUEST, } } } @@ -22,9 +22,9 @@ impl PbsClientError { impl IntoResponse for PbsClientError { fn into_response(self) -> axum::response::Response { let msg = match self { - PbsClientError::NoResponse => "no response from relays", - PbsClientError::NoPayload => "no payload from relays", - PbsClientError::BadRequest => "bad request", + Self::NoResponse => "no response from relays", + Self::NoPayload => "no payload from relays", + Self::BadRequest => "bad request", }; (self.status_code(), msg).into_response()