From 514bb1d8a20bc5a52961dfb859426d56203a3534 Mon Sep 17 00:00:00 2001 From: Sacha Lansky Date: Tue, 1 Aug 2023 15:59:11 -0400 Subject: [PATCH] [fix docs compiler warnings] Glutton pallet (#14664) * fix missing docs warnings * fmt * Update frame/glutton/src/lib.rs Co-authored-by: Oliver Tale-Yazdi * add #![deny(missing_docs)] --------- Co-authored-by: Oliver Tale-Yazdi --- substrate/frame/glutton/src/lib.rs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/substrate/frame/glutton/src/lib.rs b/substrate/frame/glutton/src/lib.rs index 1db68003ab..5950bd676b 100644 --- a/substrate/frame/glutton/src/lib.rs +++ b/substrate/frame/glutton/src/lib.rs @@ -25,6 +25,7 @@ //! `Compute` and `Storage` parameters the pallet consumes the adequate amount //! of weight. +#![deny(missing_docs)] #![cfg_attr(not(feature = "std"), no_std)] #[cfg(feature = "runtime-benchmarks")] @@ -75,11 +76,20 @@ pub mod pallet { #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// The pallet has been (re)initialized. - PalletInitialized { reinit: bool }, + PalletInitialized { + /// Whether the pallet has been re-initialized. + reinit: bool, + }, /// The computation limit has been updated. - ComputationLimitSet { compute: FixedU64 }, + ComputationLimitSet { + /// The computation limit. + compute: FixedU64, + }, /// The storage limit has been updated. - StorageLimitSet { storage: FixedU64 }, + StorageLimitSet { + /// The storage limit. + storage: FixedU64, + }, } #[pallet::error] @@ -131,10 +141,14 @@ pub mod pallet { #[pallet::genesis_config] #[derive(DefaultNoBound)] pub struct GenesisConfig { + /// The compute limit. pub compute: FixedU64, + /// The storage limit. pub storage: FixedU64, + /// The amount of trash data for wasting proof size. pub trash_data_count: u32, #[serde(skip)] + /// The required configuration field. pub _config: sp_std::marker::PhantomData, }