s/RLua/Lua
This commit is contained in:
parent
fbb1942093
commit
d74b008050
@ -1,18 +1,18 @@
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
RLua(rlua::Error),
|
Lua(rlua::Error),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<rlua::Error> for Error {
|
impl From<rlua::Error> for Error {
|
||||||
fn from(error: rlua::Error) -> Self {
|
fn from(error: rlua::Error) -> Self {
|
||||||
Error::RLua(error)
|
Error::Lua(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl std::fmt::Display for Error {
|
impl std::fmt::Display for Error {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
let res = match self {
|
let res = match self {
|
||||||
Error::RLua(e) => format!("rlua error:\n{:#?}", e),
|
Error::Lua(e) => format!("rlua error:\n{:#?}", e),
|
||||||
};
|
};
|
||||||
write!(f, "{}", res)
|
write!(f, "{}", res)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user