mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 23:37:56 +00:00
dc0795b3b9
* macros: feature-gate jsonrpsee/fetch metadata url * make CI happy * Update codegen/src/error.rs * extract `fetch-metdata` to separate crate * add missing license headers * introduce subxt-utils crate * add missing files * codegen: remove unused hex crate * fix test build * move subxt_utils -> subxt_utils_fetchmetadata * cargo fmt * runtime-path -> runtime-metadata-path * Update utils/fetch-metadata/src/lib.rs
23 lines
502 B
Rust
23 lines
502 B
Rust
// Copyright 2019-2024 Parity Technologies (UK) Ltd.
|
|
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
|
|
// see LICENSE for license details.
|
|
|
|
macro_rules! cfg_feature {
|
|
($feature:literal, $($item:item)*) => {
|
|
$(
|
|
#[cfg(feature = $feature)]
|
|
#[cfg_attr(docsrs, doc(cfg(feature = $feature)))]
|
|
$item
|
|
)*
|
|
}
|
|
}
|
|
|
|
macro_rules! cfg_fetch_from_url {
|
|
($($item:item)*) => {
|
|
crate::macros::cfg_feature!("url", $($item)*);
|
|
};
|
|
}
|
|
|
|
#[allow(unused)]
|
|
pub(crate) use {cfg_feature, cfg_fetch_from_url};
|