Skip to content

Commit 2e47fc3

Browse files
committed
fix unused-import error on android
1 parent 45e7ba9 commit 2e47fc3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: src/libstd/sys/unix/alloc.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use crate::ptr;
22
use crate::sys_common::alloc::{MIN_ALIGN, realloc_fallback};
33
use crate::alloc::{GlobalAlloc, Layout, System};
4-
use crate::mem;
54

65
#[stable(feature = "alloc_system_type", since = "1.28.0")]
76
unsafe impl GlobalAlloc for System {
@@ -88,7 +87,7 @@ unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 {
8887
let mut out = ptr::null_mut();
8988
// posix_memalign requires that the alignment be a multiple of `sizeof(void*)`.
9089
// Since these are all powers of 2, we can just use max.
91-
let align = layout.align().max(mem::size_of::<usize>());
90+
let align = layout.align().max(crate::mem::size_of::<usize>());
9291
let ret = libc::posix_memalign(&mut out, align, layout.size());
9392
if ret != 0 {
9493
ptr::null_mut()

0 commit comments

Comments
 (0)