From d0f81ba65fec0af701007a51ef742778fee0af5c Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Wed, 6 Jul 2022 18:04:52 +0800 Subject: [PATCH] Rename `extra_constant` (#5749) --- polkadot/runtime/common/src/auctions.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/polkadot/runtime/common/src/auctions.rs b/polkadot/runtime/common/src/auctions.rs index 114585e8aa..0eaabe2e6d 100644 --- a/polkadot/runtime/common/src/auctions.rs +++ b/polkadot/runtime/common/src/auctions.rs @@ -203,15 +203,13 @@ pub mod pallet { #[pallet::extra_constants] impl Pallet { - //TODO: rename to snake case after https://github.com/paritytech/substrate/issues/8826 fixed. - #[allow(non_snake_case)] - fn SlotRangeCount() -> u32 { + #[pallet::constant_name(SlotRangeCount)] + fn slot_range_count() -> u32 { SlotRange::SLOT_RANGE_COUNT as u32 } - //TODO: rename to snake case after https://github.com/paritytech/substrate/issues/8826 fixed. - #[allow(non_snake_case)] - fn LeasePeriodsPerSlot() -> u32 { + #[pallet::constant_name(LeasePeriodsPerSlot)] + fn pease_periods_per_slot() -> u32 { SlotRange::LEASE_PERIODS_PER_SLOT as u32 } }