Prep to release v0.42.0 (#2003)

* Prep to release v0.42.0

* Remove test_context reference from example

* standalone_crate for doc tests because codegen is expensive

* fmt
This commit is contained in:
James Wilson
2025-05-12 10:32:38 +01:00
committed by GitHub
parent 23c62f3d5d
commit 7de8d36806
27 changed files with 162 additions and 61 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ use super::CodegenError;
/// Generate constants from the provided pallet's metadata.
///
/// The function creates a new module named `constants` under the pallet's module.
/// ```ignore
/// ```rust,ignore
/// pub mod PalletName {
/// pub mod constants {
/// ...
+2 -2
View File
@@ -13,7 +13,7 @@ use subxt_metadata::PalletMetadata;
///
/// The function creates a new module named `events` under the pallet's module.
///
/// ```ignore
/// ```rust,ignore
/// pub mod PalletName {
/// pub mod events {
/// ...
@@ -24,7 +24,7 @@ use subxt_metadata::PalletMetadata;
/// The function generates the events as rust structs that implement the `subxt::event::StaticEvent` trait
/// to uniquely identify the event's identity when creating the extrinsic.
///
/// ```ignore
/// ```rust,ignore
/// pub struct EventName {
/// pub event_param: type,
/// }
+8 -3
View File
@@ -410,19 +410,24 @@ pub struct StructFromVariant {
/// Returns the TokenStream of the type alias module.
///
/// E.g a struct like this:
/// ```ignore
///
/// ```rust,ignore
/// pub struct SetMaxCodeSize {
/// pub new: ::core::primitive::u32,
/// }
/// ```
///
/// will be made into this:
/// ```ignore
///
/// ```rust,ignore
/// pub struct SetMaxCodeSize {
/// pub new: set_max_code_size::New,
/// }
/// ```
///
/// And the type alias module will look like this:
/// ```ignore
///
/// ```rust,ignore
/// pub mod set_max_code_size {
/// use super::runtime_types;
/// pub type New = ::core::primitive::u32;
+1 -1
View File
@@ -40,7 +40,7 @@ pub use syn;
///
/// Generating an interface using all of the defaults:
///
/// ```rust
/// ```rust,standalone_crate
/// use codec::Decode;
/// use subxt_codegen::{ Metadata, CodegenBuilder };
///