Skip to content

Commit 80f10d7

Browse files
committed
fix: moved import into #[cfg(test)]
1 parent 2de8356 commit 80f10d7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

library/alloc/src/vec/spec_from_iter.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use crate::alloc::Global;
21
use core::mem::ManuallyDrop;
32
use core::ptr::{self};
43
use core::slice::{self};
@@ -93,6 +92,6 @@ impl<'a, T: 'a + Clone> SpecFromIter<&'a T, slice::Iter<'a, T>> for Vec<T> {
9392
// NB see the slice::hack module in slice.rs for more information
9493
#[cfg(test)]
9594
fn from_iter(iterator: slice::Iter<'a, T>) -> Self {
96-
crate::slice::to_vec(iterator.as_slice(), Global)
95+
crate::slice::to_vec(iterator.as_slice(), crate::alloc::Global)
9796
}
9897
}

0 commit comments

Comments
 (0)