mirror of
https://github.com/wez/wezterm.git
synced 2024-09-11 14:25:57 +03:00
Minor error corrections
This commit is contained in:
parent
19c071f8db
commit
da5e98c101
@ -78,7 +78,7 @@ async fn read_dir<'lua>(
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
return Err(mlua::Error::external(format!(
|
||||
return Err(mlua::Error::runtime(format!(
|
||||
"the optional read_dir function returns the error: {}",
|
||||
err
|
||||
)));
|
||||
@ -90,7 +90,7 @@ async fn read_dir<'lua>(
|
||||
if include_entry {
|
||||
// TODO: Should we return Strings instead of Paths?
|
||||
// entries.push(entry_path.0.to_str().ok_or(
|
||||
// mlua::Error::external(
|
||||
// mlua::Error::runtime(
|
||||
// format!("the entry {} is not valid utf8", entry_path.0.display())
|
||||
// )
|
||||
// )?.to_string());
|
||||
|
@ -360,7 +360,7 @@ impl UserData for Path {
|
||||
}
|
||||
}
|
||||
|
||||
fn path_to_lua_str<'lua>(lua: &'lua Lua, path: &Path) -> Result<LuaString<'lua>, mlua::Error> {
|
||||
fn path_to_lua_str<'lua>(lua: &'lua Lua, path: &Path) -> mlua::Result<LuaString<'lua>> {
|
||||
lua.create_string(path.0.to_str().ok_or(mlua::Error::external(format!(
|
||||
"path entry {} is not representable as utf8",
|
||||
path.0.display()
|
||||
|
Loading…
Reference in New Issue
Block a user