Skip to content

Commit

Permalink
docs(motion): add documentation to public elements
Browse files Browse the repository at this point in the history
  • Loading branch information
al3mart committed Feb 7, 2025
1 parent d86f49f commit fed0d92
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pallets/motion/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ mod mock;
mod tests;

#[cfg(feature = "runtime-benchmarks")]
/// Dispatchable function benchmarks.
mod benchmarking;

/// Dispatchable function weights.
pub mod weights;
pub use pallet::*;
use sp_runtime::DispatchResult;
Expand All @@ -16,6 +18,7 @@ pub use weights::WeightInfo;
extern crate alloc;
use alloc::{boxed::Box, vec};

/// The motion pallet.
#[frame_support::pallet]
pub mod pallet {
use frame_support::{
Expand All @@ -28,6 +31,7 @@ pub mod pallet {
#[pallet::pallet]
pub struct Pallet<T>(_);

/// Configure the pallet by specifying the parameters and types on which it depends.
#[pallet::config]
pub trait Config: frame_system::Config {
/// The runtime event type.
Expand All @@ -48,6 +52,7 @@ pub mod pallet {
type WeightInfo: WeightInfo;
}

/// The events that can be emitted.
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
Expand All @@ -59,9 +64,11 @@ pub mod pallet {
DispatchUnanimous { motion_result: DispatchResult },

Check warning on line 64 in pallets/motion/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

missing documentation for a struct field

warning: missing documentation for a struct field --> pallets/motion/src/lib.rs:64:23 | 64 | DispatchUnanimous { motion_result: DispatchResult }, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}

/// Errors inform users that something went wrong.
#[pallet::error]
pub enum Error<T> {}

/// The dispatchable functions available.
#[pallet::call]
impl<T: Config> Pallet<T> {
/// Ensures the simple majority is met and dispatches a call with `Root` origin.
Expand Down

0 comments on commit fed0d92

Please sign in to comment.