Skip to content

Commit

Permalink
chore: clippy fixes for open metrics feature
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin authored and joshuef committed May 15, 2024
1 parent a0f9497 commit 01edbad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sn_networking/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,13 +457,15 @@ impl NetworkBuilder {
let kademlia = {
match record_store_cfg {
Some(store_cfg) => {
let mut node_record_store = NodeRecordStore::with_config(
let node_record_store = NodeRecordStore::with_config(
peer_id,
store_cfg,
network_event_sender.clone(),
swarm_cmd_sender.clone(),
);
#[cfg(feature = "open-metrics")]
let mut node_record_store = node_record_store;
#[cfg(feature = "open-metrics")]
if let Some(metrics) = &network_metrics {
node_record_store = node_record_store
.set_record_count_metric(metrics.records_stored.clone());
Expand Down
1 change: 1 addition & 0 deletions sn_networking/src/event/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ impl SwarmDriver {

let estimated_network_size =
Self::estimate_network_size(peers_in_non_full_buckets, num_of_full_buckets);
#[cfg(feature = "open-metrics")]
if let Some(metrics) = &self.network_metrics {
let _ = metrics
.estimated_network_size
Expand Down

0 comments on commit 01edbad

Please sign in to comment.