lua: use to_lua_value for wezterm.font
This is now more type-safe and clearer to read.
This commit is contained in:
1 parent
fa01ca59ca
commit
8b9fcd3063
5 files changed
+29
-14
No files matched your search
@@ -58,6 +58,12 @@ impl SerdeDeError for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Error> for mlua::Error {
|
||||
fn from(e: Error) -> mlua::Error {
|
||||
mlua::Error::external(e)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct ValueWrapper<'lua>(Value<'lua>);
|
||||
|
||||
|
||||
@@ -24,6 +24,12 @@ impl Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Error> for mlua::Error {
|
||||
fn from(e: Error) -> mlua::Error {
|
||||
mlua::Error::external(e)
|
||||
}
|
||||
}
|
||||
|
||||
impl SerError for Error {
|
||||
fn custom<T: std::fmt::Display>(msg: T) -> Self {
|
||||
Error::Custom {
|
||||
|
||||
Reference in new issue
Block a user