Skip to content

Commit 9ac47b1

Browse files
committed
fix clippy
1 parent 1b60743 commit 9ac47b1

File tree

2 files changed

+8
-19
lines changed

2 files changed

+8
-19
lines changed

src/chain-wallet-libs/bindings/wallet-core/src/tx_builder.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ impl<P: Payload> TxBuilder<P> {
3535
// It is needed to provide a 1 extra input as we are generating it later, but should take into account at this place.
3636
let value = self.builder.estimate_fee_with(1, 0);
3737
let input = Input::from_account_public_key(account_id.into(), value);
38-
self.inputs
39-
.insert(account_id, (input.clone(), spending_counter));
38+
self.inputs.insert(account_id, (input, spending_counter));
4039
Ok(self)
4140
}
4241

@@ -46,7 +45,7 @@ impl<P: Payload> TxBuilder<P> {
4645
.map_err(|e| Error::wallet_transaction().with(e))?,
4746
);
4847

49-
let (input, spending_counter) = self.inputs.get(&account.account_id()).ok_or(Error::invalid_input("Cannot find corresponded input to the provided account, make sure that you have correctly execute build_tx function first"))?.clone();
48+
let (input, spending_counter) = self.inputs.get(&account.account_id()).ok_or_else(|| Error::invalid_input("Cannot find corresponded input to the provided account, make sure that you have correctly execute build_tx function first"))?.clone();
5049
let witness_builder = account.witness_builder(spending_counter);
5150
self.builder.add_input(input, witness_builder);
5251
Ok(self)

src/jormungandr/testing/jormungandr-integration-tests/src/networking/p2p/public_traffic.rs

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
use crate::networking::utils;
22
use hersir::{
33
builder::{NetworkBuilder, Node, Topology},
4-
config::{
5-
BlockchainBuilder, BlockchainConfiguration, NodeConfig, SpawnParams, WalletTemplateBuilder,
6-
},
4+
config::{BlockchainConfiguration, SpawnParams, WalletTemplateBuilder},
75
};
86
use jormungandr_automation::{
9-
jormungandr::{explorer::configuration::ExplorerParams, LogLevel},
7+
jormungandr::LogLevel,
108
testing::{ensure_nodes_are_in_sync, SyncWaitParams},
119
};
12-
13-
use jormungandr_lib::{
14-
interfaces::{Policy, PreferredListConfig, SlotDuration, TrustedPeer},
15-
time::{Duration, SystemTime},
16-
};
10+
use jormungandr_lib::time::Duration;
1711
use multiaddr::Multiaddr;
18-
use std::{
19-
net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV6},
20-
path::PathBuf,
21-
};
22-
use thor::{FragmentSender, FragmentVerifier};
12+
use thor::FragmentSender;
2313

2414
const GATEWAY: &str = "GATEWAY";
2515

@@ -221,7 +211,7 @@ pub fn test_public_node_cannot_publish() {
221211
.gossip_interval(Duration::new(1, 0))
222212
.allow_private_addresses(true)
223213
.public_address(address)
224-
.whitelist(whitelist.clone());
214+
.whitelist(whitelist);
225215

226216
params.override_settings(&mut public_node_config);
227217

@@ -368,7 +358,7 @@ pub fn test_public_node_synced_with_internal() {
368358
.gossip_interval(Duration::new(1, 0))
369359
.allow_private_addresses(true)
370360
.public_address(address)
371-
.whitelist(whitelist.clone());
361+
.whitelist(whitelist);
372362

373363
params.override_settings(&mut public_node_config);
374364

0 commit comments

Comments
 (0)