mirror of
https://github.com/lune-org/lune.git
synced 2025-05-04 10:43:57 +01:00
chore: update returns for 'luau.*' methods
This commit is contained in:
parent
a36a996ac8
commit
cd0a20b371
1 changed files with 3 additions and 12 deletions
|
@ -41,10 +41,7 @@ fn compile_source<'lua>(
|
|||
.set_debug_level(debug_level)
|
||||
.compile(source);
|
||||
|
||||
match lua.create_string(source_bytecode_bytes) {
|
||||
Ok(lua_string) => Ok(lua_string),
|
||||
Err(exception) => Err(LuaError::RuntimeError(exception.to_string())),
|
||||
}
|
||||
lua.create_string(source_bytecode_bytes)
|
||||
}
|
||||
|
||||
fn load_source<'a>(
|
||||
|
@ -60,13 +57,7 @@ fn load_source<'a>(
|
|||
};
|
||||
}
|
||||
|
||||
let lua_object = lua
|
||||
.load(source.to_str()?.trim_start())
|
||||
lua.load(source.to_str()?.trim_start())
|
||||
.set_name(lua_debug_name.unwrap_or("luau.load(...)".to_string()))
|
||||
.into_function();
|
||||
|
||||
match lua_object {
|
||||
Ok(lua_function) => Ok(lua_function),
|
||||
Err(exception) => Err(LuaError::RuntimeError(exception.to_string())),
|
||||
}
|
||||
.into_function()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue