Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
SWvheerden committed May 24, 2024
1 parent 5e50eb8 commit dc80584
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion base_layer/common_types/src/tari_address/dual_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl DualAddress {
if bytes.len() != INTERNAL_DUAL_SIZE {
return Err(TariAddressError::InvalidSize);
}
if validate_checksum(&bytes).is_err() {
if validate_checksum(bytes).is_err() {
return Err(TariAddressError::InvalidChecksum);
}
let network = Network::try_from(bytes[0]).map_err(|_| TariAddressError::InvalidNetwork)?;
Expand Down
2 changes: 1 addition & 1 deletion base_layer/common_types/src/tari_address/single_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl SingleAddress {
if bytes.len() != INTERNAL_SINGLE_SIZE {
return Err(TariAddressError::InvalidSize);
}
if validate_checksum(&bytes).is_err() {
if validate_checksum(bytes).is_err() {
return Err(TariAddressError::InvalidChecksum);
}
let network = Network::try_from(bytes[0]).map_err(|_| TariAddressError::InvalidNetwork)?;
Expand Down
2 changes: 1 addition & 1 deletion base_layer/core/src/test_helpers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub fn create_orphan_block(block_height: u64, transactions: Vec<Transaction>, co
pub async fn default_coinbase_entities(key_manager: &MemoryDbKeyManager) -> (TariKeyId, TariAddress) {
let wallet_private_spend_key = PrivateKey::random(&mut OsRng);
let wallet_private_view_key = PrivateKey::random(&mut OsRng);
let _ = key_manager.import_key(wallet_private_view_key.clone()).await.unwrap();
let _key = key_manager.import_key(wallet_private_view_key.clone()).await.unwrap();
let script_key_id = key_manager.import_key(wallet_private_spend_key.clone()).await.unwrap();
let wallet_payment_address = TariAddress::new_dual_address_with_default_features(
PublicKey::from_secret_key(&wallet_private_view_key),
Expand Down
2 changes: 1 addition & 1 deletion base_layer/wallet/src/transaction_service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ where
let consensus_manager = self.consensus_manager.clone();
let factories = self.factories.clone();
let config = self.config.clone();
let network = self.network.clone();
let network = self.network;

context.spawn_when_ready(move |handles| async move {
let outbound_message_service = handles.expect_handle::<Dht>().outbound_requester();
Expand Down
2 changes: 1 addition & 1 deletion base_layer/wallet/src/utxo_scanner_service/initializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ where
.expect("Cannot start Utxo scanner service without setting a storage backend");
let factories = self.factories.clone();
let node_identity = self.node_identity.clone();
let network = self.network.clone();
let network = self.network;

context.spawn_when_ready(move |handles| async move {
let transaction_service = handles.expect_handle::<TransactionServiceHandle>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ async fn setup_transaction_service<P: AsRef<Path>>(
subscription_factory,
ts_backend,
node_identity.clone(),
Network::LocalNet.into(),
Network::LocalNet,
consensus_manager,
factories,
db.clone(),
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/src/merge_mining_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl MergeMiningProxyProcess {
.unwrap()
.into_inner()
.address;
let wallet_payment_address = TariAddress::from_bytes(&wallet_public_key).unwrap();
let wallet_payment_address = TariAddress::from_bytes(wallet_public_key).unwrap();
let stealth = self.stealth;
thread::spawn(move || {
let cli = Cli {
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/src/miner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl MinerProcess {
.unwrap()
.into_inner()
.address;
let wallet_payment_address = TariAddress::from_bytes(&wallet_public_key).unwrap();
let wallet_payment_address = TariAddress::from_bytes(wallet_public_key).unwrap();

let node = world.get_node(&self.base_node_name).unwrap().grpc_port;
let temp_dir = world
Expand Down

0 comments on commit dc80584

Please sign in to comment.