impl From<Error> for rlua::Error

This commit is contained in:
atweiden 2022-06-23 10:42:35 +10:00
parent 357f2b6fdd
commit c252048e2f

View File

@ -9,6 +9,12 @@ impl From<rlua::Error> for Error {
}
}
impl From<Error> for rlua::Error {
fn from(error: Error) -> Self {
rlua::Error::RuntimeError(format!("rlua-searcher error: {}", error))
}
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let res = match self {