mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 15:07:59 +00:00
Use EncodeLike for storages traits (#3676)
* impl * patch * lock * some refactor * some avoided copy * new api without ref for doublemap * fix * version bump * fix * point to incoming release * use codec latest * bumpd impl version * fix unused * fix * Update srml/support/src/storage/mod.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
committed by
Bastian Köcher
parent
83d4764d46
commit
53e0ddee4e
@@ -816,7 +816,7 @@ impl<T: Trait> Module<T> {
|
||||
if set_len + 1 == VOTER_SET_SIZE {
|
||||
NextVoterSet::put(next + 1);
|
||||
}
|
||||
<Voters<T>>::append_or_insert(next, [Some(who.clone())].into_iter())
|
||||
<Voters<T>>::append_or_insert(next, &[Some(who.clone())][..])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ impl<T: Trait> Module<T> {
|
||||
|
||||
// initialize leaderboard.
|
||||
let leaderboard_size = empty_seats + T::CarryCount::get() as usize;
|
||||
<Leaderboard<T>>::put(vec![(Zero::zero(), T::AccountId::default()); leaderboard_size]);
|
||||
<Leaderboard<T>>::put(vec![(BalanceOf::<T>::zero(), T::AccountId::default()); leaderboard_size]);
|
||||
|
||||
Self::deposit_event(RawEvent::TallyStarted(empty_seats as u32));
|
||||
}
|
||||
@@ -1027,7 +1027,7 @@ impl<T: Trait> Module<T> {
|
||||
.chunks(APPROVAL_SET_SIZE)
|
||||
.enumerate()
|
||||
.for_each(|(index, slice)| <ApprovalsOf<T>>::insert(
|
||||
(who.clone(), index as SetIndex), slice.to_vec())
|
||||
(&who, index as SetIndex), slice)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user