diff --git a/src/lib.rs b/src/lib.rs index 62bc2ac..9b899a5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,9 +22,10 @@ extern crate jemalloc_sys; extern crate libc; -use core::mem; -use core::ptr::{self, NonNull}; -use core::heap::{GlobalAlloc, Alloc, Layout, Opaque, Excess, CannotReallocInPlace, AllocErr}; +use std::mem; +use std::ptr::{self, NonNull}; +use std::heap::{GlobalAlloc, Alloc, Layout, Opaque, Excess, + CannotReallocInPlace, AllocErr}; use libc::{c_int, c_void}; diff --git a/tests/malloctl.rs b/tests/malloctl.rs index 8e38eee..38c21af 100644 --- a/tests/malloctl.rs +++ b/tests/malloctl.rs @@ -13,7 +13,7 @@ static A: Jemalloc = Jemalloc; fn smoke() { let layout = Layout::from_size_align(100, 8).unwrap(); unsafe { - let ptr = Jemalloc.alloc(layout.clone()).unwrap_or_else(|_| panic!()); + let ptr = Jemalloc.alloc(layout.clone()).unwrap(); Jemalloc.dealloc(ptr, layout); } }