Use type alias for error.

This commit is contained in:
Stephen Chung
2021-12-27 12:27:31 +08:00
parent e7ca3f41dd
commit 05d4c81e7a
29 changed files with 293 additions and 378 deletions

View File

@@ -458,7 +458,7 @@ impl Module {
#[inline]
pub(crate) fn get_qualified_var(&self, hash_var: u64) -> RhaiResultOf<&Dynamic> {
self.all_variables.get(&hash_var).ok_or_else(|| {
crate::EvalAltResult::ErrorVariableNotFound(String::new(), crate::Position::NONE).into()
crate::ERR::ErrorVariableNotFound(String::new(), crate::Position::NONE).into()
})
}