Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressing Liam's comments from https://github.com/paritytech/polkadot-sdk/pull/2657 #3150

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub(crate) fn expand_variant_count(
// This is used for pallets without instance support or pallets with instance support when
// we don't specify instance:
//
// ```nocompile
// ```
// pub struct Pallet<T, I = ()>{..}
//
// #[pallet::composite_enum]
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/support/procedural/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ pub fn origin(_: TokenStream, _: TokenStream) -> TokenStream {
///
/// ```ignore
/// Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, MaxEncodedLen, TypeInfo,
/// RuntimeDebug,
/// RuntimeDebug
/// ```
///
/// For ease of usage, when no `#[derive]` attributes are found for the enum under
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use crate::pallet::Def;
use proc_macro2::TokenStream;

/// Expands `composite_enum` and adds the `VariantCount` implementation for it."
/// Expands `composite_enum` and adds the `VariantCount` implementation for it.
pub fn expand_composites(def: &mut Def) -> TokenStream {
let mut expand = quote::quote!();
let frame_support = &def.frame_support;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,12 @@ pub struct CompositeDef {
pub index: usize,
/// The composite keyword used (contains span).
pub composite_keyword: keyword::CompositeKeyword,

/// Name of the associated type.
pub ident: syn::Ident,
/// Type parameters and where clause attached to a declaration of the pallet::composite_enum.
pub generics: syn::Generics,
/// The span of the pallet::composite_enum attribute.
pub attr_span: proc_macro2::Span,

/// Variant count of the pallet::composite_enum.
pub variant_count: u32,
}
Expand Down
Loading