From 49392d57d7d3dfe1cbb105c0c8ac0f2b8eee71c0 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Fri, 31 Jul 2020 12:40:16 +0800 Subject: [PATCH] Fix no_std feature. --- src/fn_call.rs | 4 ++-- src/scope.rs | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/fn_call.rs b/src/fn_call.rs index 91c8e67b..da029c78 100644 --- a/src/fn_call.rs +++ b/src/fn_call.rs @@ -523,14 +523,14 @@ impl Engine { state: &mut State, lib: &Module, script_expr: &Dynamic, - level: usize, + _level: usize, ) -> Result> { self.inc_operations(state)?; // Check for stack overflow #[cfg(not(feature = "no_function"))] #[cfg(not(feature = "unchecked"))] - if level > self.limits.max_call_stack_depth { + if _level > self.limits.max_call_stack_depth { return Err(Box::new( EvalAltResult::ErrorStackOverflow(Position::none()), )); diff --git a/src/scope.rs b/src/scope.rs index b2024564..a167a216 100644 --- a/src/scope.rs +++ b/src/scope.rs @@ -407,7 +407,6 @@ impl<'a> Scope<'a> { } /// Get an iterator to entries in the Scope. - #[cfg(not(feature = "no_module"))] pub(crate) fn into_iter(self) -> impl Iterator> { self.0.into_iter() }