Skip to content

Commit

Permalink
use default impl
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasad1 committed Jun 18, 2024
1 parent 61452e8 commit 5e65486
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion substrate/client/rpc-servers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ where
let http_middleware = tower::ServiceBuilder::new()
.option_layer(host_filter)
// Proxy `GET /health, /health/readiness` requests to the internal `system_health` method.
.layer(NodeHealthProxyLayer::new())
.layer(NodeHealthProxyLayer::default())
.layer(try_into_cors(cors)?);

let mut builder = jsonrpsee::server::Server::builder()
Expand Down
7 changes: 0 additions & 7 deletions substrate/client/rpc-servers/src/middleware/node_health.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ const HEADER_VALUE_JSON: HeaderValue = HeaderValue::from_static("application/jso
#[derive(Debug, Clone, Default)]
pub struct NodeHealthProxyLayer;

impl NodeHealthProxyLayer {
/// Creates a new [`NodeHealthProxyLayer`].
pub fn new() -> Self {
Self
}
}

impl<S> tower::Layer<S> for NodeHealthProxyLayer {
type Service = NodeHealthProxy<S>;

Expand Down

0 comments on commit 5e65486

Please sign in to comment.