diff options
| author | Jubilee <46493976+workingjubilee@users.noreply.github.com> | 2021-02-04 16:48:22 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-04 16:48:22 -0800 |
| commit | acbde0353c325778e0a8e2adf63d10c53e5abcee (patch) | |
| tree | 452e700fe52cb6f4bd14d7d401a9ea134e117584 | |
| parent | 9b6b5d71424a6b55c0209117d72af45253ffe8c5 (diff) | |
| parent | 8bea63425ea5d18f69802d9a1475ea1e2f417595 (diff) | |
| download | rust-acbde0353c325778e0a8e2adf63d10c53e5abcee.tar.gz rust-acbde0353c325778e0a8e2adf63d10c53e5abcee.zip | |
Merge pull request #60 from miguelraz/as-slice-prettify
AsRef -> as_slice cleanup
| -rw-r--r-- | crates/core_simd/src/ops.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/core_simd/src/ops.rs b/crates/core_simd/src/ops.rs index 51e97757c54..ae7c86c81c5 100644 --- a/crates/core_simd/src/ops.rs +++ b/crates/core_simd/src/ops.rs @@ -358,8 +358,7 @@ macro_rules! impl_unsigned_int_ops { #[inline] fn rem(self, rhs: Self) -> Self::Output { - // TODO there is probably a better way of doing this - if AsRef::<[$scalar]>::as_ref(&rhs) + if rhs.as_slice() .iter() .any(|x| *x == 0) { @@ -435,7 +434,7 @@ macro_rules! impl_unsigned_int_ops { #[inline] fn shl(self, rhs: Self) -> Self::Output { // TODO there is probably a better way of doing this - if AsRef::<[$scalar]>::as_ref(&rhs) + if rhs.as_slice() .iter() .copied() .any(invalid_shift_rhs) |
