Skip to content

Commit

Permalink
update: to clarify usage change clone to to_owned
Browse files Browse the repository at this point in the history
  • Loading branch information
aurexav committed Dec 4, 2019
1 parent 5396e4b commit 7dc7c46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions srml/kton/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
mod imbalance;

use codec::{Codec, Decode, Encode};
#[cfg(not(feature = "std"))]
use rstd::borrow::ToOwned;
use rstd::{cmp, fmt::Debug, prelude::*, result};
#[cfg(feature = "std")]
use sr_primitives::traits::One;
Expand Down Expand Up @@ -113,7 +115,7 @@ decl_storage! {
let per_block = balance / length.max(One::one());
let offset = begin * per_block + balance;

(who.clone(), VestingSchedule { offset, per_block })
(who.to_owned(), VestingSchedule { offset, per_block })
})
}).collect::<Vec<_>>()
}): map T::AccountId => Option<VestingSchedule<T::Balance>>;
Expand Down Expand Up @@ -267,7 +269,7 @@ impl<T: Trait> Currency<T::AccountId> for Module<T> {

Self::set_free_balance(transactor, new_from_balance);
Self::set_free_balance(dest, new_to_balance);
Self::deposit_event(RawEvent::TokenTransfer(transactor.clone(), dest.clone(), value));
Self::deposit_event(RawEvent::TokenTransfer(transactor.to_owned(), dest.to_owned(), value));
}

Ok(())
Expand Down

0 comments on commit 7dc7c46

Please sign in to comment.