Rename extra_constant (#5749)

This commit is contained in:
Xavier Lau
2022-07-06 18:04:52 +08:00
committed by GitHub
parent 8e60bf0007
commit d0f81ba65f
+4 -6
View File
@@ -203,15 +203,13 @@ pub mod pallet {
#[pallet::extra_constants]
impl<T: Config> Pallet<T> {
//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
}
}