Skip to content

Commit 5e3677d

Browse files
fix clippy issues
1 parent 6fd7521 commit 5e3677d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Diff for: src/blockchaintree.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ use crate::{
77
merkletree,
88
static_values::{
99
self, AMOUNT_SUMMARY, BLOCKS_PER_EPOCH, BYTE_GAS_PRICE, COINS_PER_CYCLE, GAS_SUMMARY,
10-
MAIN_CHAIN_PAYMENT, OLD_AMOUNT_SUMMARY, OLD_GAS_SUMMARY, ROOT_PUBLIC_ADDRESS,
10+
OLD_AMOUNT_SUMMARY, OLD_GAS_SUMMARY, ROOT_PUBLIC_ADDRESS,
1111
},
1212
tools,
1313
transaction::Transaction,
1414
transaction::Transactionable,
15-
txpool,
1615
types::Hash,
1716
};
1817
use error_stack::{Report, ResultExt};

Diff for: src/chain.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ impl MainChain {
162162
.change_context(BlockChainTreeError::Chain(ChainErrorKind::DumpConfig))
163163
.attach_printable("failed to write height")?;
164164

165-
file.write_all(self.difficulty.read().as_ref())
165+
let difficulty = *self.difficulty.read();
166+
file.write_all(&difficulty)
166167
.await
167168
.change_context(BlockChainTreeError::Chain(ChainErrorKind::DumpConfig))
168169
.attach_printable("failed to write difficulty")?;
@@ -540,7 +541,8 @@ impl DerivativeChain {
540541
.change_context(BlockChainTreeError::Chain(ChainErrorKind::DumpConfig))
541542
.attach_printable("failed to write height")?;
542543

543-
file.write_all(self.difficulty.read().as_ref())
544+
let difficulty = *self.difficulty.read();
545+
file.write_all(&difficulty)
544546
.await
545547
.change_context(BlockChainTreeError::Chain(ChainErrorKind::DumpConfig))
546548
.attach_printable("failed to write difficulty")?;

0 commit comments

Comments
 (0)