summary refs log tree commit diff
path: root/src/liballoc/raw_vec.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-02-02 10:14:40 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2019-02-02 10:14:40 +0100
commit7693e3e6662c2ae8aa24d69434161f501d855420 (patch)
tree753f7af71b4aa6cef036bd3ed388644cf895e42e /src/liballoc/raw_vec.rs
parente6e27924e17aa7def20ecaf88abc18ead6d97f93 (diff)
downloadrust-7693e3e6662c2ae8aa24d69434161f501d855420.tar.gz
rust-7693e3e6662c2ae8aa24d69434161f501d855420.zip
liballoc: refactor & fix some imports.
Diffstat (limited to 'src/liballoc/raw_vec.rs')
-rw-r--r--src/liballoc/raw_vec.rs25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs
index 9f9dd134826..92d482b1f05 100644
--- a/src/liballoc/raw_vec.rs
+++ b/src/liballoc/raw_vec.rs
@@ -1,16 +1,19 @@
 #![unstable(feature = "raw_vec_internals", reason = "implementation detail", issue = "0")]
 #![doc(hidden)]
 
-use core::cmp;
-use core::mem;
-use core::ops::Drop;
-use core::ptr::{self, NonNull, Unique};
-use core::slice;
-
-use crate::alloc::{Alloc, Layout, Global, handle_alloc_error};
-use crate::collections::CollectionAllocErr;
-use crate::collections::CollectionAllocErr::*;
-use crate::boxed::Box;
+use core::{
+    cmp,
+    mem,
+    ops::Drop,
+    ptr::{self, NonNull, Unique},
+    slice,
+};
+
+use crate::{
+    alloc::{Alloc, Layout, Global, handle_alloc_error},
+    collections::CollectionAllocErr::{self, *},
+    boxed::Box,
+};
 
 /// A low-level utility for more ergonomically allocating, reallocating, and deallocating
 /// a buffer of memory on the heap without having to worry about all the corner cases
@@ -753,7 +756,7 @@ mod tests {
 
     #[test]
     fn allocator_param() {
-        use alloc::AllocErr;
+        use crate::alloc::AllocErr;
 
         // Writing a test of integration between third-party
         // allocators and RawVec is a little tricky because the RawVec