From 1d661f2c8eafefda632f9c04dcf0faaa606b92a3 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Wed, 24 Mar 2021 22:26:07 +0800 Subject: [PATCH] Fix decimal build. --- src/packages/iter_basic.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/packages/iter_basic.rs b/src/packages/iter_basic.rs index 3872c45d..9d482fae 100644 --- a/src/packages/iter_basic.rs +++ b/src/packages/iter_basic.rs @@ -255,10 +255,12 @@ def_package!(crate:BasicIteratorPackage:"Basic range iterators.", lib, { lib.set_iterator::(); - let hash = lib.set_native_fn("range", |from, to| StepDecimalRange::new(from, to, Decimal::one())); - lib.update_fn_metadata(hash, &["from: Decimal", "to: Decimal", "Iterator"]); + let _hash = lib.set_native_fn("range", |from, to| StepDecimalRange::new(from, to, Decimal::one())); + #[cfg(feature = "metadata")] + lib.update_fn_metadata(_hash, &["from: Decimal", "to: Decimal", "Iterator"]); - let hash = lib.set_native_fn("range", |from, to, step| StepDecimalRange::new(from, to, step)); - lib.update_fn_metadata(hash, &["from: Decimal", "to: Decimal", "step: Decimal", "Iterator"]); + let _hash = lib.set_native_fn("range", |from, to, step| StepDecimalRange::new(from, to, step)); + #[cfg(feature = "metadata")] + lib.update_fn_metadata(_hash, &["from: Decimal", "to: Decimal", "step: Decimal", "Iterator"]); } });