diff options
Diffstat (limited to 'src/config/theme/style.rs')
| -rw-r--r-- | src/config/theme/style.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config/theme/style.rs b/src/config/theme/style.rs index 6e8d161..87cd068 100644 --- a/src/config/theme/style.rs +++ b/src/config/theme/style.rs @@ -3,7 +3,7 @@ use std::str::FromStr; use mlua::{FromLua, IntoLua}; use ratatui::style::{Color, Styled, Stylize}; -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Copy, Debug, Default)] pub struct Style { pub fg: Option<Color>, pub bg: Option<Color>, @@ -102,7 +102,7 @@ impl<'lua> FromLua<'lua> for Style { return Ok(style) } - return Err(mlua::Error::runtime("could not parse style")); + Err(mlua::Error::runtime("could not parse style")) } } @@ -114,6 +114,6 @@ impl<'lua> IntoLua<'lua> for Style { let table = lua.create_table()?; table.set("fg", self.fg.map(|s| s.to_string()).into_lua(lua)?)?; table.set("bg", self.bg.map(|s| s.to_string()).into_lua(lua)?)?; - Ok(table.into_lua(lua)?) + table.into_lua(lua) } } |