Skip to content

Commit

Permalink
Fix deprecation warning in doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vks committed Apr 29, 2024
1 parent a6fe364 commit 56d497f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/distributions/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ impl Distribution<bool> for Standard {
///
/// ```ignore
/// // this may be faster...
/// let x = unsafe { _mm_blendv_epi8(a.into(), b.into(), rng.gen::<__m128i>()) };
/// let x = unsafe { _mm_blendv_epi8(a.into(), b.into(), rng.random::<__m128i>()) };
///
/// // ...than this
/// let x = rng.gen::<mask8x16>().select(b, a);
/// let x = rng.random::<mask8x16>().select(b, a);
/// ```
///
/// Since most bits are unused you could also generate only as many bits as you need, i.e.:
Expand All @@ -169,7 +169,7 @@ impl Distribution<bool> for Standard {
/// use rand::prelude::*;
/// let mut rng = thread_rng();
///
/// let x = u16x8::splat(rng.gen::<u8>() as u16);
/// let x = u16x8::splat(rng.random::<u8>() as u16);
/// let mask = u16x8::splat(1) << u16x8::from([0, 1, 2, 3, 4, 5, 6, 7]);
/// let rand_mask = (x & mask).simd_eq(mask);
/// ```
Expand Down

0 comments on commit 56d497f

Please sign in to comment.