Move all functions metadata into metadata feature.
This commit is contained in:
@@ -142,8 +142,10 @@ macro_rules! reg_range {
|
||||
($lib:ident | $x:expr => $( $y:ty ),*) => {
|
||||
$(
|
||||
$lib.set_iterator::<Range<$y>>();
|
||||
let hash = $lib.set_native_fn($x, get_range::<$y>);
|
||||
$lib.update_fn_metadata(hash, &[
|
||||
let _hash = $lib.set_native_fn($x, get_range::<$y>);
|
||||
|
||||
#[cfg(feature = "metadata")]
|
||||
$lib.update_fn_metadata(_hash, &[
|
||||
concat!("from: ", stringify!($y)),
|
||||
concat!("to: ", stringify!($y)),
|
||||
concat!("Iterator<Item=", stringify!($y), ">")
|
||||
@@ -153,8 +155,10 @@ macro_rules! reg_range {
|
||||
($lib:ident | step $x:expr => $( $y:ty ),*) => {
|
||||
$(
|
||||
$lib.set_iterator::<StepRange<$y>>();
|
||||
let hash = $lib.set_native_fn($x, get_step_range::<$y>);
|
||||
$lib.update_fn_metadata(hash, &[
|
||||
let _hash = $lib.set_native_fn($x, get_step_range::<$y>);
|
||||
|
||||
#[cfg(feature = "metadata")]
|
||||
$lib.update_fn_metadata(_hash, &[
|
||||
concat!("from: ", stringify!($y)),
|
||||
concat!("to: ", stringify!($y)),
|
||||
concat!("step: ", stringify!($y)),
|
||||
|
Reference in New Issue
Block a user