commit 9922574dc3a47cd6eca198bd927dc13dcf0fb623
parent 8beaf23468dc2d38357dbad0bb165c8eeb3d5501
Author: Sylvia Ivory <git@sivory.net>
Date: Wed, 2 Jul 2025 01:40:04 -0700
Cleanup errors
Diffstat:
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/editor.rs b/src/editor.rs
@@ -29,9 +29,7 @@ pub struct Editor {
impl Editor {
pub fn new() -> LuaResult<Self> {
let config = Config::load()?;
- let lua_executor = config
- .get_executor()
- .map_err(|e| LuaError::ExternalError(Arc::new(e)))?;
+ let lua_executor = config.get_executor().map_err(LuaError::external)?;
let version: String = lua_executor.globals()?.get("_VERSION")?;
diff --git a/src/inspect.rs b/src/inspect.rs
@@ -426,9 +426,7 @@ impl TableFormat {
Ok(format!("table@{:?}", tbl.to_pointer()))
}
}
- TableFormat::Inspect => {
- display_table(tbl, colorize).map_err(|e| LuaError::ExternalError(Arc::new(e)))
- }
+ TableFormat::Inspect => display_table(tbl, colorize).map_err(LuaError::external),
TableFormat::ComfyTable => comfy_table(tbl, true),
}
}