lua: use to_lua_value for wezterm.font

This is now more type-safe and clearer to read.
This commit is contained in:
Wez Furlong committed 2020-02-29 22:04:34 -08:00
1 parent fa01ca59ca
commit 8b9fcd3063
5 files changed
+29 -14

No files matched your search

+6
View File
@@ -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>);
+6
View File
@@ -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 {