Skip to content

Commit 56a5157

Browse files
committed
Fix alloc feature on stable
1 parent dc5236a commit 56a5157

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
#![cfg_attr(all(feature="alloc", not(feature="std")), feature(alloc))]
5454
#![cfg_attr(all(feature="simd_support", feature="nightly"), feature(stdsimd))]
5555

56-
#[cfg(all(feature="alloc"))]
56+
#[cfg(all(feature="alloc", not(feature="std")))]
5757
extern crate alloc;
5858

5959
#[cfg(feature = "getrandom")]

src/seq/index.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ where R: Rng + ?Sized, IndexVec: From<Vec<X>> {
326326

327327
#[cfg(test)]
328328
mod test {
329-
use alloc::vec;
329+
#[cfg(feature="std")] use std::vec;
330+
#[cfg(all(feature="alloc", not(feature="std")))] use crate::alloc::vec;
330331
use super::*;
331332

332333
#[test]

0 commit comments

Comments
 (0)