Skip to content

Commit

Permalink
minor clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbondi committed Nov 14, 2021
1 parent b3a3b86 commit 0ce8ece
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions applications/tari_base_node/src/metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ pub fn install(
if let Some(addr) = bootstrap
.metrics_server_bind_addr
.as_ref()
.or(config.metrics.prometheus_scraper_bind_addr.as_ref())
.or_else(|| config.metrics.prometheus_scraper_bind_addr.as_ref())
{
metrics = metrics.with_scrape_server(addr);
}
if let Some(endpoint) = bootstrap
.metrics_push_endpoint
.as_ref()
.or(config.metrics.prometheus_push_endpoint.as_ref())
.or_else(|| config.metrics.prometheus_push_endpoint.as_ref())
{
// http://localhost:9091/metrics/job/base-node
metrics = metrics.with_push_gateway(endpoint);
Expand Down
4 changes: 2 additions & 2 deletions applications/tari_base_node/src/metrics/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ enum Error {
#[error("Failed to encode: {0}")]
PrometheusEncodeFailed(#[from] tari_metrics::Error),
#[error("Failed to encode: {0}")]
FromUtf8Error(#[from] FromUtf8Error),
FromUtf8(#[from] FromUtf8Error),
#[error("Failed to spawn blocking thread: {0}")]
JoinError(#[from] JoinError),
Join(#[from] JoinError),
}

impl Reject for Error {}

0 comments on commit 0ce8ece

Please sign in to comment.