From d61b755cc01405d930b37f5c166a30759c1c0589 Mon Sep 17 00:00:00 2001 From: Xiankun Cheng Date: Mon, 28 Feb 2022 22:45:36 +1300 Subject: [PATCH] Clean up extra_constant renaming. --- frame/transaction-payment/src/lib.rs | 5 ++--- frame/vesting/src/lib.rs | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/frame/transaction-payment/src/lib.rs b/frame/transaction-payment/src/lib.rs index e4d77a05f284b..37fecf20cc528 100644 --- a/frame/transaction-payment/src/lib.rs +++ b/frame/transaction-payment/src/lib.rs @@ -297,10 +297,9 @@ 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)] + #[pallet::constant_name(WeightToFee)] /// The polynomial that is applied in order to derive fee from weight. - fn WeightToFee() -> Vec>> { + fn weight_to_fee_polynomial() -> Vec>> { T::WeightToFee::polynomial().to_vec() } } diff --git a/frame/vesting/src/lib.rs b/frame/vesting/src/lib.rs index 747521f4fa536..775902f223ba0 100644 --- a/frame/vesting/src/lib.rs +++ b/frame/vesting/src/lib.rs @@ -171,9 +171,8 @@ 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 MaxVestingSchedules() -> u32 { + #[pallet::constant_name(MaxVestingSchedules)] + fn max_vesting_schedules() -> u32 { T::MAX_VESTING_SCHEDULES } }