mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-09 18:47:59 +00:00
Allow for remapping type parameters in type substitutions (#735)
* feat!: Allow for remapping type parameters in type substitutions * chore: cargo fmt * chore: cargo clippy * chore: Remove some old code * a little tidy * address comment nit Co-authored-by: James Wilson <james@jsdw.me>
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
#[subxt::subxt(runtime_metadata_path = "../../../../artifacts/polkadot_metadata.scale")]
|
||||
pub mod node_runtime {
|
||||
#[subxt::subxt(substitute_type = "sp_arithmetic::per_things::Perbill")]
|
||||
use sp_runtime::Perbill;
|
||||
}
|
||||
#[subxt::subxt(
|
||||
runtime_metadata_path = "../../../../artifacts/polkadot_metadata.scale",
|
||||
substitute_type(
|
||||
type = "sp_arithmetic::per_things::Perbill",
|
||||
with = "sp_runtime::Perbill"
|
||||
)
|
||||
)]
|
||||
pub mod node_runtime {}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: The substitute path must be a global absolute path; try prefixing with `::` or `crate`
|
||||
--> src/incorrect/substitute_path_not_absolute.rs:4:9
|
||||
--> src/incorrect/substitute_path_not_absolute.rs:5:16
|
||||
|
|
||||
4 | use sp_runtime::Perbill;
|
||||
| ^^^^^^^^^^
|
||||
5 | with = "sp_runtime::Perbill"
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Reference in New Issue
Block a user