Skip to content

Commit a7a12e6

Browse files
committed
Fix alloc+std feature combination
1 parent 49b64a6 commit a7a12e6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ matrix:
2929
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
3030
script:
3131
- cargo test --tests --no-default-features --features=alloc
32+
- cargo test --all --features=alloc
3233
- cargo test --all --features serde-1,log,nightly
3334
- cargo test --benches
3435
- cargo doc --no-deps --all-features

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,8 +1094,7 @@ pub fn sample<T, I, R>(rng: &mut R, iterable: I, amount: usize) -> Vec<T>
10941094
mod test {
10951095
use mock::StepRng;
10961096
use super::*;
1097-
#[cfg(feature="alloc")]
1098-
use alloc::boxed::Box;
1097+
#[cfg(all(not(feature="std"), feature="alloc"))] use alloc::boxed::Box;
10991098

11001099
pub struct TestRng<R> { inner: R }
11011100

0 commit comments

Comments
 (0)