Skip to content

Commit

Permalink
fix: moved import into #[cfg(test)]
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperC286 committed Dec 29, 2020
1 parent 2de8356 commit 80f10d7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions library/alloc/src/vec/spec_from_iter.rs
@@ -1,4 +1,3 @@
use crate::alloc::Global;
use core::mem::ManuallyDrop;
use core::ptr::{self};
use core::slice::{self};
Expand Down Expand Up @@ -93,6 +92,6 @@ impl<'a, T: 'a + Clone> SpecFromIter<&'a T, slice::Iter<'a, T>> for Vec<T> {
// NB see the slice::hack module in slice.rs for more information
#[cfg(test)]
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)
}
}

0 comments on commit 80f10d7

Please sign in to comment.