declone and close the door (#12035)

* declone and close the door

* cargo fmt

* remove brackets
This commit is contained in:
Squirrel authored and GitHub committed 2022-08-15 19:38:36 +00:00
1 parent 9c2a2495fe
commit a68a80fbae
72 files changed
+344 -512

No files matched your search

+2 -5
View File
@@ -491,7 +491,7 @@ impl<T: Config> PoolMember<T> {
true
} else {
removed_points
.try_insert(*e, p.clone())
.try_insert(*e, *p)
.expect("source map is bounded, this is a subset, will be bounded; qed");
false
}
@@ -1920,10 +1920,7 @@ pub mod pallet {
);
ReversePoolIdLookup::<T>::insert(bonded_pool.bonded_account(), pool_id);
Self::deposit_event(Event::<T>::Created {
depositor: who.clone(),
pool_id: pool_id.clone(),
});
Self::deposit_event(Event::<T>::Created { depositor: who.clone(), pool_id });
Self::deposit_event(Event::<T>::Bonded {
member: who,
@@ -244,7 +244,7 @@ pub mod v2 {
},
};
total_value_locked += bonded_pool.points_to_balance(points.clone());
total_value_locked += bonded_pool.points_to_balance(*points);
let portion = Perbill::from_rational(*points, bonded_pool.points);
let last_claim = portion * accumulated_reward;