Skip to content

Commit 61ca71a

Browse files
committed
Fix deprecaion warning in doc comment
1 parent a6fe364 commit 61ca71a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/distributions/other.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ impl Distribution<bool> for Standard {
156156
///
157157
/// ```ignore
158158
/// // this may be faster...
159-
/// let x = unsafe { _mm_blendv_epi8(a.into(), b.into(), rng.gen::<__m128i>()) };
159+
/// let x = unsafe { _mm_blendv_epi8(a.into(), b.into(), rng.random::<__m128i>()) };
160160
///
161161
/// // ...than this
162-
/// let x = rng.gen::<mask8x16>().select(b, a);
162+
/// let x = rng.random::<mask8x16>().select(b, a);
163163
/// ```
164164
///
165165
/// Since most bits are unused you could also generate only as many bits as you need, i.e.:
@@ -169,7 +169,7 @@ impl Distribution<bool> for Standard {
169169
/// use rand::prelude::*;
170170
/// let mut rng = thread_rng();
171171
///
172-
/// let x = u16x8::splat(rng.gen::<u8>() as u16);
172+
/// let x = u16x8::splat(rng.random::<u8>() as u16);
173173
/// let mask = u16x8::splat(1) << u16x8::from([0, 1, 2, 3, 4, 5, 6, 7]);
174174
/// let rand_mask = (x & mask).simd_eq(mask);
175175
/// ```

0 commit comments

Comments
 (0)