diff --git a/src/parser.rs b/src/parser.rs index 0ba2ff60..16065b48 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -201,7 +201,7 @@ impl<'e> ParseState<'e> { } else { NonZeroUsize::new(index) }; - + (index, is_func) } diff --git a/src/serde/de.rs b/src/serde/de.rs index 747b0597..aa6bbd66 100644 --- a/src/serde/de.rs +++ b/src/serde/de.rs @@ -1,9 +1,7 @@ //! Implement deserialization support of [`Dynamic`][crate::Dynamic] for [`serde`]. use crate::types::dynamic::Union; -use crate::{ - Dynamic, ImmutableString, LexError, Position, RhaiError, RhaiResultOf, SmartString, ERR, -}; +use crate::{Dynamic, ImmutableString, LexError, Position, RhaiError, RhaiResultOf, ERR}; use serde::de::{Error, IntoDeserializer, Visitor}; use serde::{Deserialize, Deserializer}; #[cfg(feature = "no_std")] @@ -422,7 +420,7 @@ impl<'de> Deserializer<'de> for &mut DynamicDeserializer<'de> { || self.type_error(), |map| { _visitor.visit_map(IterateMap::new( - map.keys().map(SmartString::as_str), + map.keys().map(crate::SmartString::as_str), map.values(), )) }, diff --git a/tests/options.rs b/tests/options.rs index 4e672cf9..27ff3ca2 100644 --- a/tests/options.rs +++ b/tests/options.rs @@ -105,8 +105,7 @@ fn test_options_strict_var() -> Result<(), Box> { #[cfg(not(feature = "no_function"))] { assert_eq!( - engine - .eval_with_scope::(&mut scope, "fn foo(z) { y + z } let f = foo; f.call(x)")?, + engine.eval_with_scope::(&mut scope, "fn foo(z) { z } let f = foo; call(f, x)")?, 42 ); assert!(engine.compile("let f = |y| x * y;").is_err());