declone and close the door (#12035)

* declone and close the door

* cargo fmt

* remove brackets
This commit is contained in:
Squirrel
2022-08-15 20:38:36 +01:00
committed by GitHub
parent 9c2a2495fe
commit a68a80fbae
72 changed files with 344 additions and 512 deletions
+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());
}