mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 10:57:56 +00:00
Pallet proc macro doc improvements (#7955)
* Fix weight syntax in comments * Mention to add `IsType` bound * Link to subsee * Fix link * Update frame/support/procedural/src/pallet/parse/call.rs Co-authored-by: David <dvdplm@gmail.com> * Apply review suggestion from @dvdplm, make StorageInstance doc link * fix ui test Co-authored-by: David <dvdplm@gmail.com> Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -57,7 +57,7 @@ pub struct CallVariantDef {
|
||||
}
|
||||
|
||||
/// Attributes for functions in call impl block.
|
||||
/// Parse for `#[pallet::weight = expr]`
|
||||
/// Parse for `#[pallet::weight(expr)]`
|
||||
pub struct FunctionAttr {
|
||||
weight: syn::Expr,
|
||||
}
|
||||
@@ -175,7 +175,7 @@ impl CallDef {
|
||||
|
||||
if call_var_attrs.len() != 1 {
|
||||
let msg = if call_var_attrs.is_empty() {
|
||||
"Invalid pallet::call, require weight attribute i.e. `#[pallet::weight = $expr]`"
|
||||
"Invalid pallet::call, requires weight attribute i.e. `#[pallet::weight($expr)]`"
|
||||
} else {
|
||||
"Invalid pallet::call, too many weight attributes given"
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user