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

@@ -1,6 +1,5 @@
use crate::{
Engine, EvalAltResult, Identifier, Module, ModuleResolver, Position, RhaiResultOf, Shared,
SmartString,
Engine, Identifier, Module, ModuleResolver, Position, RhaiResultOf, Shared, SmartString, ERR,
};
#[cfg(feature = "no_std")]
use std::prelude::v1::*;
@@ -136,7 +135,7 @@ impl ModuleResolver for StaticModuleResolver {
self.0
.get(path)
.cloned()
.ok_or_else(|| EvalAltResult::ErrorModuleNotFound(path.into(), pos).into())
.ok_or_else(|| ERR::ErrorModuleNotFound(path.into(), pos).into())
}
}