From 386f5a69c3d3ba8057e9cdf29175a10c620d9f11 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 13 Feb 2024 12:53:46 +0100 Subject: [PATCH] Fix warning dead_code --- substrate/frame/nomination-pools/src/migration.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/substrate/frame/nomination-pools/src/migration.rs b/substrate/frame/nomination-pools/src/migration.rs index e9131a82e4ea..5231de3f8847 100644 --- a/substrate/frame/nomination-pools/src/migration.rs +++ b/substrate/frame/nomination-pools/src/migration.rs @@ -150,6 +150,7 @@ pub(crate) mod v7 { Pallet::::create_bonded_account(self.id) } + #[allow(dead_code)] fn points_to_balance(&self, points: BalanceOf) -> BalanceOf { let bonded_balance = T::Staking::active_stake(&self.bonded_account()).unwrap_or(Zero::zero()); @@ -243,6 +244,7 @@ pub(crate) mod v7 { } impl UnbondPool { + #[allow(dead_code)] fn point_to_balance(&self, points: BalanceOf) -> BalanceOf { point_to_balance::(self.balance, self.points, points) } @@ -265,6 +267,7 @@ pub(crate) mod v7 { pub type SubPoolsStorage = CountedStorageMap, Twox64Concat, PoolId, SubPools>; + #[allow(dead_code)] fn total_balance(self_as_member: &PoolMember) -> BalanceOf { // let pool = V7BondedPool::::get(self_as_member.pool_id).unwrap(); let id = self_as_member.pool_id; @@ -292,6 +295,7 @@ pub(crate) mod v7 { active_balance + unbonding_balance } + #[allow(dead_code)] fn point_to_balance( current_balance: BalanceOf, current_points: BalanceOf,