mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 15:13:16 +00:00
fix some lints
This commit is contained in:
parent
d85c70d5ed
commit
038dec96d9
8 changed files with 71 additions and 69 deletions
8
ewext/Cargo.lock
generated
8
ewext/Cargo.lock
generated
|
@ -52,9 +52,9 @@ checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7"
|
|||
|
||||
[[package]]
|
||||
name = "bitcode"
|
||||
version = "0.6.4"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2ae9f4d868fa036ee7517b997dc2b6efd383a8b2efdcb4b07058260de060d3ef"
|
||||
checksum = "18c1406a27371b2f76232a2259df6ab607b91b5a0a7476a7729ff590df5a969a"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitcode_derive",
|
||||
|
@ -65,9 +65,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "bitcode_derive"
|
||||
version = "0.6.4"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d0b1506d8de85c2198149fb9f6285e6b662a867f84579af2b3ef067a8842d35"
|
||||
checksum = "42b6b4cb608b8282dc3b53d0f4c9ab404655d562674c682db7e6c0458cc83c23"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
8
ewext/noita_api/Cargo.lock
generated
8
ewext/noita_api/Cargo.lock
generated
|
@ -16,9 +16,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
|||
|
||||
[[package]]
|
||||
name = "bitcode"
|
||||
version = "0.6.4"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2ae9f4d868fa036ee7517b997dc2b6efd383a8b2efdcb4b07058260de060d3ef"
|
||||
checksum = "18c1406a27371b2f76232a2259df6ab607b91b5a0a7476a7729ff590df5a969a"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitcode_derive",
|
||||
|
@ -29,9 +29,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "bitcode_derive"
|
||||
version = "0.6.4"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d0b1506d8de85c2198149fb9f6285e6b662a867f84579af2b3ef067a8842d35"
|
||||
checksum = "42b6b4cb608b8282dc3b53d0f4c9ab404655d562674c682db7e6c0458cc83c23"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
|
@ -1371,98 +1371,98 @@ impl Lua51 {
|
|||
) -> std::os::raw::c_int {
|
||||
self.lua_gc.as_ref().expect("Expected function, got error.")(L, what, data)
|
||||
}
|
||||
pub unsafe fn lua_error(&self, L: *mut lua_State) -> std::os::raw::c_int {
|
||||
pub unsafe fn lua_error(&self, L: *mut lua_State) -> std::os::raw::c_int {unsafe{
|
||||
self.lua_error
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L)
|
||||
.expect("Expected function, got error.")(L)}
|
||||
}
|
||||
pub unsafe fn lua_next(
|
||||
&self,
|
||||
L: *mut lua_State,
|
||||
idx: std::os::raw::c_int,
|
||||
) -> std::os::raw::c_int {
|
||||
) -> std::os::raw::c_int {unsafe{
|
||||
self.lua_next
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, idx)
|
||||
.expect("Expected function, got error.")(L, idx)}
|
||||
}
|
||||
pub unsafe fn lua_concat(&self, L: *mut lua_State, n: std::os::raw::c_int) {
|
||||
pub unsafe fn lua_concat(&self, L: *mut lua_State, n: std::os::raw::c_int) {unsafe{
|
||||
self.lua_concat
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, n)
|
||||
.expect("Expected function, got error.")(L, n)}
|
||||
}
|
||||
pub unsafe fn lua_getallocf(
|
||||
&self,
|
||||
L: *mut lua_State,
|
||||
ud: *mut *mut std::os::raw::c_void,
|
||||
) -> lua_Alloc {
|
||||
) -> lua_Alloc {unsafe{
|
||||
self.lua_getallocf
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, ud)
|
||||
.expect("Expected function, got error.")(L, ud)}
|
||||
}
|
||||
pub unsafe fn lua_setallocf(
|
||||
&self,
|
||||
L: *mut lua_State,
|
||||
f: lua_Alloc,
|
||||
ud: *mut std::os::raw::c_void,
|
||||
) {
|
||||
) {unsafe{
|
||||
self.lua_setallocf
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, f, ud)
|
||||
.expect("Expected function, got error.")(L, f, ud)}
|
||||
}
|
||||
pub unsafe fn lua_setlevel(&self, from: *mut lua_State, to: *mut lua_State) {
|
||||
pub unsafe fn lua_setlevel(&self, from: *mut lua_State, to: *mut lua_State) {unsafe{
|
||||
self.lua_setlevel
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(from, to)
|
||||
.expect("Expected function, got error.")(from, to)}
|
||||
}
|
||||
pub unsafe fn lua_getstack(
|
||||
&self,
|
||||
L: *mut lua_State,
|
||||
level: std::os::raw::c_int,
|
||||
ar: *mut lua_Debug,
|
||||
) -> std::os::raw::c_int {
|
||||
) -> std::os::raw::c_int {unsafe{
|
||||
self.lua_getstack
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, level, ar)
|
||||
.expect("Expected function, got error.")(L, level, ar)}
|
||||
}
|
||||
pub unsafe fn lua_getinfo(
|
||||
&self,
|
||||
L: *mut lua_State,
|
||||
what: *const std::os::raw::c_char,
|
||||
ar: *mut lua_Debug,
|
||||
) -> std::os::raw::c_int {
|
||||
) -> std::os::raw::c_int {unsafe{
|
||||
self.lua_getinfo
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, what, ar)
|
||||
.expect("Expected function, got error.")(L, what, ar)}
|
||||
}
|
||||
pub unsafe fn lua_getlocal(
|
||||
&self,
|
||||
L: *mut lua_State,
|
||||
ar: *const lua_Debug,
|
||||
n: std::os::raw::c_int,
|
||||
) -> *const std::os::raw::c_char {
|
||||
) -> *const std::os::raw::c_char {unsafe{
|
||||
self.lua_getlocal
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, ar, n)
|
||||
.expect("Expected function, got error.")(L, ar, n)}
|
||||
}
|
||||
pub unsafe fn lua_setlocal(
|
||||
&self,
|
||||
L: *mut lua_State,
|
||||
ar: *const lua_Debug,
|
||||
n: std::os::raw::c_int,
|
||||
) -> *const std::os::raw::c_char {
|
||||
) -> *const std::os::raw::c_char {unsafe{
|
||||
self.lua_setlocal
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, ar, n)
|
||||
.expect("Expected function, got error.")(L, ar, n)}
|
||||
}
|
||||
pub unsafe fn lua_getupvalue(
|
||||
&self,
|
||||
L: *mut lua_State,
|
||||
funcindex: std::os::raw::c_int,
|
||||
n: std::os::raw::c_int,
|
||||
) -> *const std::os::raw::c_char {
|
||||
) -> *const std::os::raw::c_char {unsafe{
|
||||
self.lua_getupvalue
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, funcindex, n)
|
||||
.expect("Expected function, got error.")(L, funcindex, n)}
|
||||
}
|
||||
pub unsafe fn lua_setupvalue(
|
||||
&self,
|
||||
|
@ -1470,9 +1470,9 @@ impl Lua51 {
|
|||
funcindex: std::os::raw::c_int,
|
||||
n: std::os::raw::c_int,
|
||||
) -> *const std::os::raw::c_char {
|
||||
self.lua_setupvalue
|
||||
unsafe{ self.lua_setupvalue
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, funcindex, n)
|
||||
.expect("Expected function, got error.")(L, funcindex, n)}
|
||||
}
|
||||
pub unsafe fn lua_sethook(
|
||||
&self,
|
||||
|
@ -1481,24 +1481,24 @@ impl Lua51 {
|
|||
mask: std::os::raw::c_int,
|
||||
count: std::os::raw::c_int,
|
||||
) -> std::os::raw::c_int {
|
||||
self.lua_sethook
|
||||
unsafe{ self.lua_sethook
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, func, mask, count)
|
||||
}
|
||||
}}
|
||||
pub unsafe fn lua_gethook(&self, L: *mut lua_State) -> lua_Hook {
|
||||
self.lua_gethook
|
||||
unsafe{ self.lua_gethook
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L)
|
||||
.expect("Expected function, got error.")(L)}
|
||||
}
|
||||
pub unsafe fn lua_gethookmask(&self, L: *mut lua_State) -> std::os::raw::c_int {
|
||||
self.lua_gethookmask
|
||||
unsafe{ self.lua_gethookmask
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L)
|
||||
.expect("Expected function, got error.")(L)}
|
||||
}
|
||||
pub unsafe fn lua_gethookcount(&self, L: *mut lua_State) -> std::os::raw::c_int {
|
||||
self.lua_gethookcount
|
||||
unsafe{ self.lua_gethookcount
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L)
|
||||
.expect("Expected function, got error.")(L)}
|
||||
}
|
||||
pub unsafe fn lua_upvalueid(
|
||||
&self,
|
||||
|
@ -1506,9 +1506,11 @@ impl Lua51 {
|
|||
idx: std::os::raw::c_int,
|
||||
n: std::os::raw::c_int,
|
||||
) -> *mut std::os::raw::c_void {
|
||||
self.lua_upvalueid
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, idx, n)
|
||||
unsafe {
|
||||
self.lua_upvalueid
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, idx, n)
|
||||
}
|
||||
}
|
||||
pub unsafe fn lua_upvaluejoin(
|
||||
&self,
|
||||
|
@ -1518,9 +1520,9 @@ impl Lua51 {
|
|||
idx2: std::os::raw::c_int,
|
||||
n2: std::os::raw::c_int,
|
||||
) {
|
||||
self.lua_upvaluejoin
|
||||
unsafe{self.lua_upvaluejoin
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, idx1, n1, idx2, n2)
|
||||
.expect("Expected function, got error.")(L, idx1, n1, idx2, n2)}
|
||||
}
|
||||
pub unsafe fn lua_loadx(
|
||||
&self,
|
||||
|
@ -1530,8 +1532,8 @@ impl Lua51 {
|
|||
chunkname: *const std::os::raw::c_char,
|
||||
mode: *const std::os::raw::c_char,
|
||||
) -> std::os::raw::c_int {
|
||||
self.lua_loadx
|
||||
unsafe{self.lua_loadx
|
||||
.as_ref()
|
||||
.expect("Expected function, got error.")(L, reader, dt, chunkname, mode)
|
||||
.expect("Expected function, got error.")(L, reader, dt, chunkname, mode)}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ pub(crate) unsafe fn grab_addr_from_instruction(
|
|||
) -> *mut c_void {
|
||||
let instruction_addr = func.wrapping_offset(offset);
|
||||
// We don't really have an idea of how many bytes the instruction takes, so just take *enough* bytes for most cases.
|
||||
let instruction_bytes = ptr::read_unaligned(instruction_addr.cast::<[u8; 16]>());
|
||||
let instruction_bytes = unsafe{ptr::read_unaligned(instruction_addr.cast::<[u8; 16]>())};
|
||||
let mut decoder = Decoder::with_ip(
|
||||
32,
|
||||
&instruction_bytes,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#[cfg(feature = "pre2204")]
|
||||
#[no_mangle]
|
||||
pub extern "C" fn _Unwind_Resume() {}
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn _unwind_resume() {}
|
||||
|
||||
use addr_grabber::{grab_addrs, grabbed_fns, grabbed_globals};
|
||||
use bimap::BiHashMap;
|
||||
|
@ -424,7 +424,7 @@ pub(crate) fn print_error(error: eyre::Report) -> eyre::Result<()> {
|
|||
/// # Safety
|
||||
///
|
||||
/// Only gets called by lua when loading a module.
|
||||
#[no_mangle]
|
||||
#[unsafe(no_mangle)]
|
||||
pub unsafe extern "C" fn luaopen_ewext1(lua: *mut lua_State) -> c_int {
|
||||
println!("Initializing ewext");
|
||||
|
||||
|
@ -695,4 +695,4 @@ pub unsafe extern "C" fn luaopen_ewext1(lua: *mut lua_State) -> c_int {
|
|||
}
|
||||
println!("Initializing ewext - Ok");
|
||||
1
|
||||
}
|
||||
}
|
|
@ -89,13 +89,13 @@ impl ParticleWorldState {
|
|||
let built_runner = self.runner.build();
|
||||
let runs = built_runner.len();
|
||||
for run in built_runner {
|
||||
let noita_pixel_run = pixel_runs.as_mut().unwrap();
|
||||
let noita_pixel_run = unsafe{pixel_runs.as_mut().unwrap()};
|
||||
noita_pixel_run.length = (run.length - 1) as u16;
|
||||
noita_pixel_run.material = run.data.material;
|
||||
noita_pixel_run.flags = run.data.flags;
|
||||
pixel_runs = pixel_runs.offset(1);
|
||||
pixel_runs = unsafe{pixel_runs.offset(1)};
|
||||
}
|
||||
self.runner.clear();
|
||||
runs
|
||||
}
|
||||
}
|
||||
}
|
20
noita-proxy/Cargo.lock
generated
20
noita-proxy/Cargo.lock
generated
|
@ -471,9 +471,9 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
|
|||
|
||||
[[package]]
|
||||
name = "bitcode"
|
||||
version = "0.6.4"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2ae9f4d868fa036ee7517b997dc2b6efd383a8b2efdcb4b07058260de060d3ef"
|
||||
checksum = "18c1406a27371b2f76232a2259df6ab607b91b5a0a7476a7729ff590df5a969a"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitcode_derive",
|
||||
|
@ -484,9 +484,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "bitcode_derive"
|
||||
version = "0.6.4"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d0b1506d8de85c2198149fb9f6285e6b662a867f84579af2b3ef067a8842d35"
|
||||
checksum = "42b6b4cb608b8282dc3b53d0f4c9ab404655d562674c682db7e6c0458cc83c23"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -6480,27 +6480,27 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "zstd"
|
||||
version = "0.13.2"
|
||||
version = "0.13.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9"
|
||||
checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a"
|
||||
dependencies = [
|
||||
"zstd-safe",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zstd-safe"
|
||||
version = "7.2.1"
|
||||
version = "7.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059"
|
||||
checksum = "f3051792fbdc2e1e143244dc28c60f73d8470e93f3f9cbd0ead44da5ed802722"
|
||||
dependencies = [
|
||||
"zstd-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zstd-sys"
|
||||
version = "2.0.13+zstd.1.5.6"
|
||||
version = "2.0.14+zstd.1.5.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa"
|
||||
checksum = "8fb060d4926e4ac3a3ad15d864e99ceb5f343c6b34f5bd6d81ae6ed417311be5"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"pkg-config",
|
||||
|
|
8
shared/Cargo.lock
generated
8
shared/Cargo.lock
generated
|
@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
|
|||
|
||||
[[package]]
|
||||
name = "bitcode"
|
||||
version = "0.6.4"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2ae9f4d868fa036ee7517b997dc2b6efd383a8b2efdcb4b07058260de060d3ef"
|
||||
checksum = "18c1406a27371b2f76232a2259df6ab607b91b5a0a7476a7729ff590df5a969a"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitcode_derive",
|
||||
|
@ -23,9 +23,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "bitcode_derive"
|
||||
version = "0.6.4"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d0b1506d8de85c2198149fb9f6285e6b662a867f84579af2b3ef067a8842d35"
|
||||
checksum = "42b6b4cb608b8282dc3b53d0f4c9ab404655d562674c682db7e6c0458cc83c23"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue