Skip to content

Commit 53f535d

Browse files
committed
Can we remove standalone_crate from many examples?
1 parent 378b7e7 commit 53f535d

File tree

7 files changed

+24
-24
lines changed

7 files changed

+24
-24
lines changed

codegen/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub use syn;
3939
///
4040
/// Generating an interface using all of the defaults:
4141
///
42-
/// ```rust,standalone_crate
42+
/// ```rust
4343
/// use codec::Decode;
4444
/// use subxt_codegen::{ Metadata, CodegenBuilder };
4545
///

rpcs/src/client/rpc_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl std::ops::Deref for RpcClient {
106106
///
107107
/// # Example
108108
///
109-
/// ```rust,standalone_crate
109+
/// ```rust
110110
/// use subxt_rpcs::client::{ rpc_params, RpcParams };
111111
///
112112
/// // If you provide no params you get `None` back
@@ -138,7 +138,7 @@ pub use rpc_params;
138138
///
139139
/// # Example
140140
///
141-
/// ```rust,standalone_crate
141+
/// ```rust
142142
/// use subxt_rpcs::client::RpcParams;
143143
///
144144
/// let mut params = RpcParams::new();

signer/src/ecdsa.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl Keypair {
4848
///
4949
/// # Example
5050
///
51-
/// ```rust,standalone_crate
51+
/// ```rust
5252
/// use subxt_signer::{ SecretUri, ecdsa::Keypair };
5353
/// use std::str::FromStr;
5454
///
@@ -84,7 +84,7 @@ impl Keypair {
8484
///
8585
/// # Example
8686
///
87-
/// ```rust,standalone_crate
87+
/// ```rust
8888
/// use subxt_signer::{ bip39::Mnemonic, ecdsa::Keypair };
8989
///
9090
/// let phrase = "bottom drive obey lake curtain smoke basket hold race lonely fit walk";
@@ -122,7 +122,7 @@ impl Keypair {
122122
///
123123
/// # Example
124124
///
125-
/// ```rust,standalone_crate
125+
/// ```rust
126126
/// use subxt_signer::{ bip39::Mnemonic, ecdsa::Keypair, DeriveJunction };
127127
///
128128
/// let phrase = "bottom drive obey lake curtain smoke basket hold race lonely fit walk";
@@ -178,7 +178,7 @@ impl Keypair {
178178

179179
/// Verify that some signature for a message was created by the owner of the [`PublicKey`].
180180
///
181-
/// ```rust,standalone_crate
181+
/// ```rust
182182
/// use subxt_signer::{ bip39::Mnemonic, ecdsa };
183183
///
184184
/// let keypair = ecdsa::dev::alice();

signer/src/eth.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl Keypair {
4646
///
4747
/// # Example
4848
///
49-
/// ```rust,standalone_crate
49+
/// ```rust
5050
/// use subxt_signer::{ bip39::Mnemonic, eth::{ Keypair, DerivationPath } };
5151
///
5252
/// let phrase = "bottom drive obey lake curtain smoke basket hold race lonely fit walk";
@@ -175,7 +175,7 @@ impl AsRef<[u8; 65]> for Signature {
175175

176176
/// Verify that some signature for a message was created by the owner of the [`PublicKey`].
177177
///
178-
/// ```rust,standalone_crate
178+
/// ```rust
179179
/// use subxt_signer::{ bip39::Mnemonic, eth };
180180
///
181181
/// let keypair = eth::dev::alith();

signer/src/sr25519.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl Keypair {
5858
///
5959
/// # Example
6060
///
61-
/// ```rust,standalone_crate
61+
/// ```rust
6262
/// use subxt_signer::{ SecretUri, sr25519::Keypair };
6363
/// use std::str::FromStr;
6464
///
@@ -94,7 +94,7 @@ impl Keypair {
9494
///
9595
/// # Example
9696
///
97-
/// ```rust,standalone_crate
97+
/// ```rust
9898
/// use subxt_signer::{ bip39::Mnemonic, sr25519::Keypair };
9999
///
100100
/// let phrase = "bottom drive obey lake curtain smoke basket hold race lonely fit walk";
@@ -144,7 +144,7 @@ impl Keypair {
144144
///
145145
/// # Example
146146
///
147-
/// ```rust,standalone_crate
147+
/// ```rust
148148
/// use subxt_signer::{ bip39::Mnemonic, sr25519::Keypair, DeriveJunction };
149149
///
150150
/// let phrase = "bottom drive obey lake curtain smoke basket hold race lonely fit walk";
@@ -186,7 +186,7 @@ impl Keypair {
186186

187187
/// Verify that some signature for a message was created by the owner of the [`PublicKey`].
188188
///
189-
/// ```rust,standalone_crate
189+
/// ```rust
190190
/// use subxt_signer::{ bip39::Mnemonic, sr25519 };
191191
///
192192
/// let keypair = sr25519::dev::alice();

subxt/src/backend/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub(crate) fn spawn<F: std::future::Future + Send + 'static>(future: F) {
2525
///
2626
/// # Example
2727
///
28-
/// ```rust,no_run,standalone_crate
28+
/// ```rust,no_run
2929
/// use subxt::backend::utils::retry;
3030
///
3131
/// async fn some_future() -> Result<(), subxt::error::BackendError> {
@@ -85,7 +85,7 @@ where
8585
///
8686
/// # Example
8787
///
88-
/// ```rust,no_run,standalone_crate
88+
/// ```rust,no_run
8989
/// use subxt::backend::{utils::retry_stream, StreamOf};
9090
/// use futures::future::FutureExt;
9191
///

subxt/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ pub mod ext {
126126
///
127127
/// Annotate a Rust module with the `subxt` attribute referencing a metadata file like so:
128128
///
129-
/// ```rust,no_run,standalone_crate
129+
/// ```rust,no_run
130130
/// #[subxt::subxt(
131131
/// runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale",
132132
/// )]
@@ -173,7 +173,7 @@ pub mod ext {
173173
///
174174
/// Use this attribute to specify a custom path to the `subxt` crate:
175175
///
176-
/// ```rust,standalone_crate
176+
/// ```rust
177177
/// # pub extern crate subxt;
178178
/// # pub mod path { pub mod to { pub use subxt; } }
179179
/// # fn main() {}
@@ -192,7 +192,7 @@ pub mod ext {
192192
/// This attribute replaces any reference to the generated type at the path given by `path` with a
193193
/// reference to the path given by `with`.
194194
///
195-
/// ```rust,standalone_crate
195+
/// ```rust
196196
/// #[subxt::subxt(
197197
/// runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale",
198198
/// substitute_type(path = "sp_arithmetic::per_things::Perbill", with = "crate::Foo")
@@ -230,7 +230,7 @@ pub mod ext {
230230
/// If the type you're substituting contains generic parameters, you can "pattern match" on those, and
231231
/// make use of them in the substituted type, like so:
232232
///
233-
/// ```rust,no_run,standalone_crate
233+
/// ```rust,no_run
234234
/// #[subxt::subxt(
235235
/// runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale",
236236
/// substitute_type(
@@ -250,7 +250,7 @@ pub mod ext {
250250
/// By default, all generated types derive a small set of traits. This attribute allows you to derive additional
251251
/// traits on all generated types:
252252
///
253-
/// ```rust,no_run,standalone_crate
253+
/// ```rust,no_run
254254
/// #[subxt::subxt(
255255
/// runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale",
256256
/// derive_for_all_types = "Eq, PartialEq"
@@ -266,7 +266,7 @@ pub mod ext {
266266
/// Unlike the above, which derives some trait on every generated type, this attribute allows you to derive traits only
267267
/// for specific types. Note that any types which are used inside the specified type may also need to derive the same traits.
268268
///
269-
/// ```rust,no_run,standalone_crate
269+
/// ```rust,no_run
270270
/// #[subxt::subxt(
271271
/// runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale",
272272
/// derive_for_all_types = "Eq, PartialEq",
@@ -281,7 +281,7 @@ pub mod ext {
281281
/// By default, documentation is not generated via the macro, since IDEs do not typically make use of it. This attribute
282282
/// forces documentation to be generated, too.
283283
///
284-
/// ```rust,no_run,standalone_crate
284+
/// ```rust,no_run
285285
/// #[subxt::subxt(
286286
/// runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale",
287287
/// generate_docs
@@ -294,7 +294,7 @@ pub mod ext {
294294
/// By default, the macro will generate various interfaces to make using Subxt simpler in addition with any types that need
295295
/// generating to make this possible. This attribute makes the codegen only generate the types and not the Subxt interface.
296296
///
297-
/// ```rust,no_run,standalone_crate
297+
/// ```rust,no_run
298298
/// #[subxt::subxt(
299299
/// runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale",
300300
/// runtime_types_only
@@ -307,7 +307,7 @@ pub mod ext {
307307
/// By default, the macro will add all derives necessary for the generated code to play nicely with Subxt. Adding this attribute
308308
/// removes all default derives.
309309
///
310-
/// ```rust,no_run,standalone_crate
310+
/// ```rust,no_run
311311
/// #[subxt::subxt(
312312
/// runtime_metadata_path = "../artifacts/polkadot_metadata_full.scale",
313313
/// runtime_types_only,

0 commit comments

Comments
 (0)