Unbox error return for Engine::register_custom_syntax.

This commit is contained in:
Stephen Chung 2020-08-05 10:00:20 +08:00
parent 9f302d4ef5
commit 8a0d0e3e20
2 changed files with 2 additions and 1 deletions

View File

@ -36,6 +36,7 @@ Breaking changes
* `PackagesCollection::get_fn`, `PackagesCollection::contains_fn`, `Module::get_fn` and `Module::contains_fn` now take an additional `public_only` parameter indicating whether only public functions are accepted.
* The iterator returned by `Scope::iter` now contains a clone of the `Dynamic` value (unshared).
* `Engine::load_package` takes any type that is `Into<PackageLibrary>`.
* Error in `Engine::register_custom_syntax` is no longer `Box`-ed.
Housekeeping
------------

View File

@ -100,7 +100,7 @@ impl Engine {
) -> Result<Dynamic, Box<EvalAltResult>>
+ SendSync
+ 'static,
) -> Result<&mut Self, Box<ParseError>> {
) -> Result<&mut Self, ParseError> {
let mut segments: StaticVec<_> = Default::default();
for s in keywords {