Skip to content

Commit 6d45bef

Browse files
committed
fix clippy
1 parent a3729d8 commit 6d45bef

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

src/chain-libs/chain-impl-mockchain/src/accounting/account/spending.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl SpendingCounterIncreasing {
5151
}
5252

5353
pub fn get_valid_counters(&self) -> [SpendingCounter; Self::LANES] {
54-
self.nexts.clone()
54+
self.nexts
5555
}
5656

5757
/// try to match the lane of the counter in argument, if it doesn't match

src/chain-wallet-libs/wallet/src/account.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@ pub enum Error {
3737
NotEnoughFunds { current: Value, needed: Value },
3838
#[error("invalid lane for spending counter")]
3939
InvalidLane,
40-
#[error("malformed spending counters")]
41-
MalformedSpendingCounters,
4240
#[error("spending counter does not match current state")]
4341
NonMonotonicSpendingCounter,
4442
#[error(transparent)]
45-
SpendingCountersError(#[from] spending::Error),
43+
SpendingCounters(#[from] spending::Error),
4644
}
4745

4846
pub enum EitherAccount {

src/jormungandr/jormungandr-lib/src/interfaces/account_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl AccountState {
115115
///
116116
#[inline]
117117
pub fn counters(&self) -> [u32; SpendingCounterIncreasing::LANES] {
118-
self.counters.clone()
118+
self.counters
119119
}
120120

121121
/// the last rewards transfered to account

src/vit-testing/iapyx/src/controller/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl Controller {
206206
.into_iter()
207207
.map(|(p, c)| {
208208
self.wallet
209-
.set_state((*account_state.value()).into(), counters.clone());
209+
.set_state((*account_state.value()).into(), counters);
210210
let tx = self
211211
.wallet
212212
.vote(

src/vit-testing/iapyx/src/load/multi_controller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl MultiController {
141141
let txs = votes_data
142142
.into_iter()
143143
.map(|(p, c)| {
144-
wallet.set_state((*account_state.value()).into(), counters.clone());
144+
wallet.set_state((*account_state.value()).into(), counters);
145145
let tx = wallet
146146
.vote(
147147
settings.clone(),

0 commit comments

Comments
 (0)