diff options
| author | C <DeveloperC@protonmail.com> | 2020-12-05 13:27:03 +0000 |
|---|---|---|
| committer | C <DeveloperC@protonmail.com> | 2020-12-29 14:03:30 +0000 |
| commit | 80f10d7aa7b3e3bf9a47de6ef2a9f4439d993c48 (patch) | |
| tree | 49c901e30d1fde5627b6a24e6c7c4906bf4aaefb /library/alloc/src/vec | |
| parent | 2de8356f60a7a9800809ab60e813fcfd4a7accf2 (diff) | |
| download | rust-80f10d7aa7b3e3bf9a47de6ef2a9f4439d993c48.tar.gz rust-80f10d7aa7b3e3bf9a47de6ef2a9f4439d993c48.zip | |
fix: moved import into #[cfg(test)]
Diffstat (limited to 'library/alloc/src/vec')
| -rw-r--r-- | library/alloc/src/vec/spec_from_iter.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/library/alloc/src/vec/spec_from_iter.rs b/library/alloc/src/vec/spec_from_iter.rs index 4349d158210..bbfcc68daef 100644 --- a/library/alloc/src/vec/spec_from_iter.rs +++ b/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}; @@ -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) } } |
