fix: moved import into #[cfg(test)]

This commit is contained in:
C 2020-12-05 13:27:03 +00:00
parent 2de8356f60
commit 80f10d7aa7

View File

@ -1,4 +1,3 @@
use crate::alloc::Global;
use core::mem::ManuallyDrop; use core::mem::ManuallyDrop;
use core::ptr::{self}; use core::ptr::{self};
use core::slice::{self}; use core::slice::{self};
@ -93,6 +92,6 @@ fn from_iter(iterator: slice::Iter<'a, T>) -> Self {
// NB see the slice::hack module in slice.rs for more information // NB see the slice::hack module in slice.rs for more information
#[cfg(test)] #[cfg(test)]
fn from_iter(iterator: slice::Iter<'a, T>) -> Self { fn from_iter(iterator: slice::Iter<'a, T>) -> Self {
crate::slice::to_vec(iterator.as_slice(), Global) crate::slice::to_vec(iterator.as_slice(), crate::alloc::Global)
} }
} }