From fa5aedca9c25dc188d25ee20e13e465226d92eae Mon Sep 17 00:00:00 2001 From: Dori Medini Date: Thu, 11 Jul 2024 14:33:44 +0300 Subject: [PATCH] fix: clippy error, whitelist blocks_in_conditions Signed-off-by: Dori Medini --- crates/papyrus_monitoring_gateway/src/lib.rs | 2 +- scripts/clippy.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/papyrus_monitoring_gateway/src/lib.rs b/crates/papyrus_monitoring_gateway/src/lib.rs index 823b2044f2..1f7e068c91 100644 --- a/crates/papyrus_monitoring_gateway/src/lib.rs +++ b/crates/papyrus_monitoring_gateway/src/lib.rs @@ -313,7 +313,7 @@ async fn node_config_by_secret( async fn metrics(prometheus_handle: Option) -> Response { match prometheus_handle { Some(handle) => { - Collector::default().prefix(PROCESS_METRICS_PREFIX).collect(); + Collector::new(PROCESS_METRICS_PREFIX).collect(); handle.render().into_response() } None => StatusCode::METHOD_NOT_ALLOWED.into_response(), diff --git a/scripts/clippy.sh b/scripts/clippy.sh index 82d240a763..c14b806bc0 100755 --- a/scripts/clippy.sh +++ b/scripts/clippy.sh @@ -1,3 +1,3 @@ #!/bin/bash -cargo clippy "$@" --all-targets --all-features +cargo clippy "$@" --all-targets --all-features -- -Aclippy::blocks_in_conditions