summaryrefslogtreecommitdiff
path: root/tests/module/src
diff options
context:
space:
mode:
authorAlex Orlenko <zxteam@protonmail.com>2023-03-03 18:58:13 +0000
committerAlex Orlenko <zxteam@protonmail.com>2023-03-03 18:58:13 +0000
commit87d027e8acc14c1bcc6c8c994bbbe06dd538daf8 (patch)
tree753c24d4f1fbaa745362695dc0cb82cd95493deb /tests/module/src
parentd7db1b7f2eff01eca1531760d28d8b28bb8054ac (diff)
downloadmlua-87d027e8acc14c1bcc6c8c994bbbe06dd538daf8.zip
Rename rust_module in tests to test_module
This causes warning during compilation
Diffstat (limited to 'tests/module/src')
-rw-r--r--tests/module/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/module/src/lib.rs b/tests/module/src/lib.rs
index 3963dbd..28b5b45 100644
--- a/tests/module/src/lib.rs
+++ b/tests/module/src/lib.rs
@@ -13,7 +13,7 @@ fn check_userdata(_: &Lua, ud: LuaAnyUserData) -> LuaResult<i32> {
}
#[mlua::lua_module]
-fn rust_module(lua: &Lua) -> LuaResult<LuaTable> {
+fn test_module(lua: &Lua) -> LuaResult<LuaTable> {
let exports = lua.create_table()?;
exports.set("sum", lua.create_function(sum)?)?;
exports.set("used_memory", lua.create_function(used_memory)?)?;
@@ -26,14 +26,14 @@ struct MyUserData(i32);
impl LuaUserData for MyUserData {}
-#[mlua::lua_module(name = "rust_module_second")]
-fn rust_module2(lua: &Lua) -> LuaResult<LuaTable> {
+#[mlua::lua_module(name = "test_module_second")]
+fn test_module2(lua: &Lua) -> LuaResult<LuaTable> {
let exports = lua.create_table()?;
exports.set("userdata", MyUserData(123))?;
Ok(exports)
}
#[mlua::lua_module]
-fn rust_module_error(_: &Lua) -> LuaResult<LuaTable> {
+fn test_module_error(_: &Lua) -> LuaResult<LuaTable> {
Err("custom module error".into_lua_err())
}