pub fn slashable_balance_of_fn() -> Box<dyn Fn(&T::AccountId) -> VoteWeight> {
		// NOTE: changing this to unboxed `impl Fn(..)` return type and the pallet will still
		// compile, while some types in mock fail to resolve.
		let issuance = T::Currency::total_issuance();
		Box::new(move |who: &T::AccountId| -> VoteWeight {
			Self::slashable_balance_of_vote_weight(who, issuance)
		})
	}
/// Returns a closure around `slashable_balance_of_vote_weight` that can be passed around.
///
/// This prevents call sites from repeatedly requesting `total_issuance` from backend. But it is
/// important to be only used while the total issuance is not changing.
Returns a closure around `slashable_balance_of_vote_weight` that can be passed around.
This prevents call sites from repeatedly requesting `total_issuance` from backend. But it is
important to be only used while the total issuance is not changing.
Returns a closure around ` slashable_balance_of_vote_weight ` that can be passed around . This prevents call sites from repeatedly requesting ` total_issuance ` from backend . But it is important to be only used while the total issuance is not changing .
pub fn slashable_balance_of_fn() -> Box<dyn Fn(&T::AccountId) -> VoteWeight> {
		// NOTE: changing this to unboxed `impl Fn(..)` return type and the pallet will still
		// compile, while some types in mock fail to resolve.
		let issuance = T::Currency::total_issuance();
		Box::new(move |who: &T::AccountId| -> VoteWeight {
			Self::slashable_balance_of_vote_weight(who, issuance)
		})
	}
pub fn slashable_balance_of_fn ( ) -> Box < dyn Fn ( & T :: AccountId ) -> VoteWeight > { // NOTE: changing this to unboxed `impl Fn(..)` return type and the pallet will still // compile, while some types in mock fail to resolve. let issuance = T :: Currency :: total_issuance ( ) ; Box :: new ( move | who : & T :: AccountId | -> VoteWeight { Self :: slashable_balance_of_vote_weight ( who , issuance ) } ) }
Returns a closure around `slashable_balance_of_vote_weight` that can be passed around.
Returns a closure around ` slashable_balance_of_vote_weight ` that can be passed around .