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 -2
View File
@@ -115,11 +115,11 @@ thread_local! {
pub struct TestFreezer;
impl FrozenBalance<u32, u64, u64> for TestFreezer {
fn frozen_balance(asset: u32, who: &u64) -> Option<u64> {
FROZEN.with(|f| f.borrow().get(&(asset, who.clone())).cloned())
FROZEN.with(|f| f.borrow().get(&(asset, *who)).cloned())
}
fn died(asset: u32, who: &u64) {
HOOKS.with(|h| h.borrow_mut().push(Hook::Died(asset, who.clone())));
HOOKS.with(|h| h.borrow_mut().push(Hook::Died(asset, *who)));
// Sanity check: dead accounts have no balance.
assert!(Assets::balance(asset, *who).is_zero());
}