Skip to content

Commit

Permalink
Remove unnecessary into_make_service calls
Browse files Browse the repository at this point in the history
Co-authored-by: Neotamandua <[email protected]>
  • Loading branch information
SplittyDev and Neotamandua authored Apr 24, 2024
1 parent 4c679c7 commit d767271
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hdrop-server/src/server/hdrop_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ impl Server {

// Start the server
let listener = TcpListener::bind(&addr).await?;
axum::serve(listener, app.into_make_service())
axum::serve(listener, app)
.await
.unwrap_or_else(|err| panic!("Server failed to start on {addr}: {err:?}"));

Expand Down
2 changes: 1 addition & 1 deletion hdrop-server/src/server/prometheus_metrics_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl PrometheusMetricsServer {
};

// Start the server and log any errors
if let Err(err) = axum::serve(listener, app.into_make_service()).await {
if let Err(err) = axum::serve(listener, app).await {
tracing::error!("Prometheus exporter failed to start: {}", err);
}
}
Expand Down

0 comments on commit d767271

Please sign in to comment.