add Copy to Moment type (#3476)

* add Copy to Moment type

* bump version

* add Copy to support::Traits::Time::Moment and removed few clones
This commit is contained in:
Xiliang Chen
2019-08-25 22:57:31 +12:00
committed by Bastian Köcher
parent 672e62fe0f
commit da03850eed
6 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -258,7 +258,7 @@ impl<T: Trait> Module<T> {
fn on_timestamp_set(now: T::Moment, slot_duration: T::Moment) {
let last = Self::last();
<Self as Store>::LastTimestamp::put(now.clone());
<Self as Store>::LastTimestamp::put(now);
if last.is_zero() {
return;
@@ -266,7 +266,7 @@ impl<T: Trait> Module<T> {
assert!(!slot_duration.is_zero(), "Aura slot duration cannot be zero.");
let last_slot = last / slot_duration.clone();
let last_slot = last / slot_duration;
let cur_slot = now / slot_duration;
assert!(last_slot < cur_slot, "Only one block may be authored per slot.");