Skip to content

Commit e9bb98f

Browse files
committed
mlua-sys: Fix wrong cfg flags in luaL_makeseed (Lua 5.5)
1 parent 705a677 commit e9bb98f

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

mlua-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ luajit-src = { version = ">= 210.7.0, < 210.8.0", optional = true }
4646
luau0-src = { version = "0.20.0", optional = true }
4747

4848
[lints.rust]
49-
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(raw_dylib)'] }
49+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(raw_dylib)'] }

mlua-sys/src/lua55/lauxlib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,11 @@ pub unsafe fn luaL_loadbufferenv(
190190
status
191191
}
192192

193+
#[allow(unused_variables, unreachable_code)]
193194
pub unsafe fn luaL_makeseed(L: *mut lua_State) -> c_uint {
194-
#[cfg(macos)]
195+
#[cfg(target_os = "macos")]
195196
return libc::arc4random();
196-
#[cfg(linux)]
197+
#[cfg(target_os = "linux")]
197198
{
198199
let mut seed = 0u32;
199200
let buf = &mut seed as *mut _ as *mut c_void;

0 commit comments

Comments
 (0)