Skip to content

Commit acbde03

Browse files
Merge pull request rust-lang#60 from miguelraz/as-slice-prettify
AsRef -> as_slice cleanup
2 parents 9b6b5d7 + 8bea634 commit acbde03

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: crates/core_simd/src/ops.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,7 @@ macro_rules! impl_unsigned_int_ops {
358358

359359
#[inline]
360360
fn rem(self, rhs: Self) -> Self::Output {
361-
// TODO there is probably a better way of doing this
362-
if AsRef::<[$scalar]>::as_ref(&rhs)
361+
if rhs.as_slice()
363362
.iter()
364363
.any(|x| *x == 0)
365364
{
@@ -435,7 +434,7 @@ macro_rules! impl_unsigned_int_ops {
435434
#[inline]
436435
fn shl(self, rhs: Self) -> Self::Output {
437436
// TODO there is probably a better way of doing this
438-
if AsRef::<[$scalar]>::as_ref(&rhs)
437+
if rhs.as_slice()
439438
.iter()
440439
.copied()
441440
.any(invalid_shift_rhs)

0 commit comments

Comments
 (0)