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)
|
.set_debug_level(debug_level)
|
||||||
.compile(source);
|
.compile(source);
|
||||||
|
|
||||||
match lua.create_string(source_bytecode_bytes) {
|
lua.create_string(source_bytecode_bytes)
|
||||||
Ok(lua_string) => Ok(lua_string),
|
|
||||||
Err(exception) => Err(LuaError::RuntimeError(exception.to_string())),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn load_source<'a>(
|
fn load_source<'a>(
|
||||||
|
@ -60,13 +57,7 @@ fn load_source<'a>(
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
let lua_object = lua
|
lua.load(source.to_str()?.trim_start())
|
||||||
.load(source.to_str()?.trim_start())
|
|
||||||
.set_name(lua_debug_name.unwrap_or("luau.load(...)".to_string()))
|
.set_name(lua_debug_name.unwrap_or("luau.load(...)".to_string()))
|
||||||
.into_function();
|
.into_function()
|
||||||
|
|
||||||
match lua_object {
|
|
||||||
Ok(lua_function) => Ok(lua_function),
|
|
||||||
Err(exception) => Err(LuaError::RuntimeError(exception.to_string())),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue