Skip to content

Commit a43d7f1

Browse files
committed
Fix tests
1 parent 2ef2e66 commit a43d7f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/distributions/other.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ impl<T> Distribution<Wrapping<T>> for Standard where Standard: Distribution<T> {
179179
mod tests {
180180
use super::*;
181181
use crate::RngCore;
182+
#[cfg(all(not(feature="std"), feature="alloc"))] use alloc::string::String;
182183

183184
#[test]
184185
fn test_misc() {
@@ -232,7 +233,7 @@ mod tests {
232233
test_samples(&Standard, 'a', &['\u{8cdac}', '\u{a346a}', '\u{80120}', '\u{ed692}', '\u{35888}']);
233234
test_samples(&Alphanumeric, 'a', &['h', 'm', 'e', '3', 'M']);
234235
test_samples(&Standard, false, &[true, true, false, true, false]);
235-
test_samples(&Standard, Option::<bool>::None,
236+
test_samples(&Standard, None as Option<bool>,
236237
&[Some(true), None, Some(false), None, Some(false)]);
237238
test_samples(&Standard, Wrapping(0i32), &[Wrapping(-2074640887),
238239
Wrapping(-1719949321), Wrapping(2018088303),

0 commit comments

Comments
 (0)