Skip to content

Commit

Permalink
Apply cargo clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Mar 21, 2024
1 parent 5245acb commit 075f357
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion chain/src/consume_orphan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use crate::utils::orphan_block_pool::OrphanBlockPool;
use crate::{LonelyBlock, LonelyBlockHash};
use ckb_channel::{select, Receiver, Sender};
use ckb_error::{Error, InternalErrorKind};
use ckb_error::Error;
use ckb_logger::internal::trace;
use ckb_logger::{debug, error, info};
use ckb_shared::block_status::BlockStatus;
Expand Down
2 changes: 1 addition & 1 deletion chain/src/utils/orphan_block_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl InnerPool {
let parent_hash = lonely_block.block().data().header().raw().parent_hash();
self.blocks
.entry(parent_hash.clone())
.or_insert_with(HashMap::default)
.or_default()
.insert(hash.clone(), lonely_block);
// Out-of-order insertion needs to be deduplicated
self.leaders.remove(&hash);
Expand Down
4 changes: 0 additions & 4 deletions util/metrics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
//!
//! [`ckb-metrics-service`]: ../ckb_metrics_service/index.html
use prometheus::{
register_histogram, register_histogram_vec, register_int_counter, register_int_gauge,
register_int_gauge_vec, Histogram, HistogramVec, IntCounter, IntGauge, IntGaugeVec,
};
use prometheus_static_metric::make_static_metric;
use std::cell::Cell;

Expand Down

0 comments on commit 075f357

Please sign in to comment.