Skip to content

Commit ba7a045

Browse files
committed
Fixed: macOS Build with Enabled Warnings
1 parent a6e4be8 commit ba7a045

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src-rust/src/c/buffers_c_buffers.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -332,19 +332,22 @@ pub extern "C" fn overwrite_allocated_code_ex(
332332
}
333333

334334
#[cfg(test)]
335+
#[allow(unused_imports)]
335336
mod tests {
336-
use crate::c::buffers_c_buffers::{
337-
buffers_allocate_private_memory, buffers_get_buffer, buffersearchsettings_from_proximity,
338-
};
339-
use crate::c::buffers_c_buffers::{free_allocation_result, free_get_buffer_result};
340-
use crate::c::buffers_c_locatoritem::{
341-
locatoritem_append_bytes, locatoritem_bytes_left, locatoritem_min_address,
337+
use crate::c::{
338+
buffers_c_buffers::{
339+
buffers_allocate_private_memory, buffers_get_buffer,
340+
buffersearchsettings_from_proximity, free_allocation_result, free_get_buffer_result,
341+
},
342+
buffers_c_locatoritem::locatoritem_append_bytes,
342343
};
343344
use crate::{
345+
c::buffers_c_locatoritem::{locatoritem_bytes_left, locatoritem_min_address},
344346
internal::locator_header_finder::LocatorHeaderFinder,
345347
structs::params::{BufferAllocatorSettings, BufferSearchSettings},
346348
utilities::cached::get_sys_info,
347349
};
350+
348351
use rstest::rstest;
349352

350353
#[cfg(not(target_os = "macos"))]
@@ -436,11 +439,9 @@ mod tests {
436439
}
437440

438441
let settings = buffersearchsettings_from_proximity(i32::MAX as usize, base_address, SIZE);
439-
440442
let result = buffers_get_buffer(&settings);
441443

442444
assert!(result.is_ok);
443-
444445
assert!(locatoritem_bytes_left(result.ok) >= SIZE as u32);
445446

446447
let offset = (locatoritem_min_address(result.ok) as i64 - base_address as i64).abs();

0 commit comments

Comments
 (0)