From 8a0d0e3e201936a354c59897ff51e02f4cbb9cba Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Wed, 5 Aug 2020 10:00:20 +0800 Subject: [PATCH] Unbox error return for Engine::register_custom_syntax. --- RELEASES.md | 1 + src/syntax.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 7e72c56b..23973fe7 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -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`. +* Error in `Engine::register_custom_syntax` is no longer `Box`-ed. Housekeeping ------------ diff --git a/src/syntax.rs b/src/syntax.rs index 9dfc255f..4cc937e6 100644 --- a/src/syntax.rs +++ b/src/syntax.rs @@ -100,7 +100,7 @@ impl Engine { ) -> Result> + SendSync + 'static, - ) -> Result<&mut Self, Box> { + ) -> Result<&mut Self, ParseError> { let mut segments: StaticVec<_> = Default::default(); for s in keywords {