Skip to content

Commit 74e9319

Browse files
committed
Use full path to vec! in smallvec! macro
Fixes #197
1 parent 34d7b8d commit 74e9319

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
#![cfg_attr(feature = "may_dangle", feature(dropck_eyepatch))]
3232
#![deny(missing_docs)]
3333

34-
#[macro_use]
35-
extern crate alloc;
34+
#[doc(hidden)]
35+
pub extern crate alloc;
3636

3737
#[cfg(any(test, feature = "write"))]
3838
extern crate std;
3939

4040
use alloc::boxed::Box;
41-
use alloc::vec::Vec;
41+
use alloc::{vec, vec::Vec};
4242
use core::borrow::{Borrow, BorrowMut};
4343
use core::cmp;
4444
use core::fmt;
@@ -116,7 +116,7 @@ macro_rules! smallvec {
116116
$(vec.push($x);)*
117117
vec
118118
} else {
119-
$crate::SmallVec::from_vec(vec![$($x,)*])
119+
$crate::SmallVec::from_vec($crate::alloc::vec![$($x,)*])
120120
}
121121
});
122122
}
@@ -1684,7 +1684,7 @@ mod tests {
16841684
use alloc::borrow::ToOwned;
16851685
use alloc::boxed::Box;
16861686
use alloc::rc::Rc;
1687-
use alloc::vec::Vec;
1687+
use alloc::{vec, vec::Vec};
16881688

16891689
#[test]
16901690
pub fn test_zero() {

0 commit comments

Comments
 (0)