docs: fix typo gather -> scatter

Co-authored-by: Jacob Lifshay <programmerjake@gmail.com>
This commit is contained in:
Jubilee 2021-09-28 12:47:44 -07:00
parent 6d23662689
commit 01e9816ace

View file

@ -218,7 +218,7 @@ where
/// // If this mask was used to scatter, it would be unsound. Let's fix that.
/// let mask = mask & idxs.lanes_lt(Simd::splat(vec.len()));
///
/// // We have masked the OOB lane, so it's safe to gather now.
/// // We have masked the OOB lane, so it's safe to scatter now.
/// unsafe { vals.scatter_select_unchecked(&mut vec, mask, idxs); }
/// // index 0's second write is masked, thus was omitted.
/// assert_eq!(vec, vec![-41, 11, 12, 82, 14, 15, 16, 17, 18]);