Reduce feature gates on imports.

This commit is contained in:
Stephen Chung
2020-11-16 16:28:04 +08:00
parent ef02150afd
commit adb902326e
20 changed files with 206 additions and 292 deletions

View File

@@ -6,9 +6,6 @@ use crate::token::{Position, NO_POS};
use crate::utils::ImmutableString;
use crate::INT;
#[cfg(not(feature = "no_function"))]
use crate::engine::is_anonymous_fn;
use crate::stdlib::{
boxed::Box,
error::Error,
@@ -159,7 +156,7 @@ impl fmt::Display for EvalAltResult {
Self::ErrorParsing(p, _) => write!(f, "Syntax error: {}", p)?,
#[cfg(not(feature = "no_function"))]
Self::ErrorInFunctionCall(s, err, _) if is_anonymous_fn(s) => {
Self::ErrorInFunctionCall(s, err, _) if crate::engine::is_anonymous_fn(s) => {
write!(f, "Error in call to closure: {}", err)?
}
Self::ErrorInFunctionCall(s, err, _) => {