Skip to content

Commit

Permalink
clippy: fix some lints
Browse files Browse the repository at this point in the history
Signed-off-by: ljedrz <[email protected]>
  • Loading branch information
ljedrz committed Dec 16, 2021
1 parent 4901b6b commit 0c5be51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/network/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl<N: Network, E: Environment> Server<N, E> {
let prover = Prover::open::<RocksDB, _>(
&mut tasks,
&prover_storage_path,
miner.clone(),
miner,
local_ip,
&status,
&terminator,
Expand Down Expand Up @@ -125,7 +125,7 @@ impl<N: Network, E: Environment> Server<N, E> {
)
.await;
// Initialize a new instance of the notification.
Self::initialize_notification(&mut tasks, ledger.reader(), prover.clone(), miner.clone()).await;
Self::initialize_notification(&mut tasks, ledger.reader(), prover.clone(), miner).await;

Ok(Self {
local_ip,
Expand Down Expand Up @@ -327,7 +327,7 @@ impl<N: Network, E: Environment> Server<N, E> {
// Notify the outer function that the task is ready.
let _ = router.send(());
loop {
info!("{}", notification_message(miner.clone()));
info!("{}", notification_message(miner));

if E::NODE_TYPE == NodeType::Miner {
if let Some(miner) = miner {
Expand Down
2 changes: 1 addition & 1 deletion storage/src/helpers/block_locators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl<N: Network> BlockLocators<N> {
#[inline]
pub fn get_cumulative_weight(&self, block_height: u32) -> Option<u128> {
match self.block_locators.get(&block_height) {
Some((_, header)) => header.as_ref().and_then(|header| Some(header.cumulative_weight())),
Some((_, header)) => header.as_ref().map(|header| header.cumulative_weight()),
_ => None,
}
}
Expand Down

0 comments on commit 0c5be51

Please sign in to comment.