From 552ec2251ec8ee9a70d9ef86e881bceaca477092 Mon Sep 17 00:00:00 2001 From: SW van Heerden Date: Fri, 30 Aug 2024 10:38:56 +0200 Subject: [PATCH] clippy --- .../comms/examples/ledger_demo/main.rs | 4 ---- .../core/src/validation/header/header_full_validator.rs | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/applications/minotari_ledger_wallet/comms/examples/ledger_demo/main.rs b/applications/minotari_ledger_wallet/comms/examples/ledger_demo/main.rs index 219afb37c4..cdb193d233 100644 --- a/applications/minotari_ledger_wallet/comms/examples/ledger_demo/main.rs +++ b/applications/minotari_ledger_wallet/comms/examples/ledger_demo/main.rs @@ -391,15 +391,11 @@ fn main() { match ledger_get_view_key(account) { Ok(view_key_2) => { println!("view_key: {}", view_key_2.to_hex()); - return; }, Err(e) => { println!("\nError: {}\n", e); - return; }, } - - println!("\nTest completed successfully\n"); } pub fn get_random_nonce() -> PrivateKey { diff --git a/base_layer/core/src/validation/header/header_full_validator.rs b/base_layer/core/src/validation/header/header_full_validator.rs index e19bd6ec1d..3dc3418880 100644 --- a/base_layer/core/src/validation/header/header_full_validator.rs +++ b/base_layer/core/src/validation/header/header_full_validator.rs @@ -50,12 +50,11 @@ pub struct HeaderFullValidator { impl HeaderFullValidator { pub fn new(rules: ConsensusManager, difficulty_calculator: DifficultyCalculator) -> Self { - - let gen_hash = rules.get_genesis_block().hash().clone(); + let gen_hash = *rules.get_genesis_block().hash(); Self { rules, difficulty_calculator, - gen_hash + gen_hash, } } }