File tree Expand file tree Collapse file tree 5 files changed +5
-7
lines changed
chain-libs/chain-impl-mockchain/src/accounting/account
chain-wallet-libs/wallet/src
jormungandr/jormungandr-lib/src/interfaces Expand file tree Collapse file tree 5 files changed +5
-7
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
4846pub enum EitherAccount {
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 (
Original file line number Diff line number Diff 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 ( ) ,
You can’t perform that action at this time.
0 commit comments