Fix serde build.

This commit is contained in:
Stephen Chung 2020-11-02 13:18:37 +08:00
parent d7d6f74dfd
commit cc304ba513
2 changed files with 5 additions and 5 deletions

View File

@ -10,7 +10,7 @@ use crate::fn_call::run_builtin_binary_op;
use crate::module::Module; use crate::module::Module;
use crate::parser::map_dynamic_to_expr; use crate::parser::map_dynamic_to_expr;
use crate::scope::Scope; use crate::scope::Scope;
use crate::token::{is_valid_identifier, NO_POS}; use crate::token::{is_valid_identifier, NO_POS};
use crate::{calc_native_fn_hash, StaticVec}; use crate::{calc_native_fn_hash, StaticVec};
#[cfg(not(feature = "no_function"))] #[cfg(not(feature = "no_function"))]

View File

@ -2,7 +2,7 @@
use super::str::ImmutableStringDeserializer; use super::str::ImmutableStringDeserializer;
use crate::dynamic::{Dynamic, Union}; use crate::dynamic::{Dynamic, Union};
use crate::parse_error::ParseErrorType; use crate::parse_error::{LexError, ParseErrorType};
use crate::result::EvalAltResult; use crate::result::EvalAltResult;
use crate::token::NO_POS; use crate::token::NO_POS;
use crate::utils::ImmutableString; use crate::utils::ImmutableString;
@ -123,10 +123,10 @@ pub fn from_dynamic<'de, T: Deserialize<'de>>(
impl Error for Box<EvalAltResult> { impl Error for Box<EvalAltResult> {
fn custom<T: fmt::Display>(err: T) -> Self { fn custom<T: fmt::Display>(err: T) -> Self {
EvalAltResult::ErrorParsing(ParseErrorType::BadInput( EvalAltResult::ErrorParsing(
LexError::ImproperSymbol(err.to_string()), ParseErrorType::BadInput(LexError::ImproperSymbol(err.to_string())),
NO_POS, NO_POS,
)) )
.into() .into()
} }
} }