lua: suppress userdata is not expected type error in repl

When printing built-in-to-lua userdata, avoid tripping over
an error message from mlua.

refs: https://github.com/khvzak/mlua/issues/291
refs: https://github.com/wez/wezterm/issues/3849
This commit is contained in:
Wez Furlong committed 2023-07-11 10:27:30 -07:00
1 parent c7ff432581
commit 523660c192
1 file changed
+1 -3
+1 -3
View File
@@ -411,9 +411,7 @@ impl<'lua> std::fmt::Debug for ValuePrinterHelper<'lua> {
}
}
}
Err(err) => {
write!(fmt, "Error getting metatable: {err:#}")
}
Err(_) => fmt.write_str("userdata"),
},
LuaValue::LightUserData(_) => fmt.write_str("userdata"),
LuaValue::Thread(_) => fmt.write_str("thread"),