diff options
| author | Ralf Jung <post@ralfj.de> | 2023-09-21 08:03:45 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-09-21 08:03:45 +0200 |
| commit | ed8fbcb05910f4439ec572bd163cc99a3603e378 (patch) | |
| tree | 463acd2b2c1a776d7e24f3ea13f1e33ad258e9f3 | |
| parent | e018f49d4597cc5575703e3ff1d53a8cba11757a (diff) | |
| download | rust-ed8fbcb05910f4439ec572bd163cc99a3603e378.tar.gz rust-ed8fbcb05910f4439ec572bd163cc99a3603e378.zip | |
fix clippy lints
| -rw-r--r-- | src/tools/miri/src/shims/x86/sse2.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/tools/miri/src/shims/x86/sse2.rs b/src/tools/miri/src/shims/x86/sse2.rs index b68690a835c..d3bfb53afd2 100644 --- a/src/tools/miri/src/shims/x86/sse2.rs +++ b/src/tools/miri/src/shims/x86/sse2.rs @@ -426,8 +426,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { let right_res = i8::try_from(right).unwrap_or(if right < 0 { i8::MIN } else { i8::MAX }); - this.write_scalar(Scalar::from_i8(left_res.try_into().unwrap()), &left_dest)?; - this.write_scalar(Scalar::from_i8(right_res.try_into().unwrap()), &right_dest)?; + this.write_scalar(Scalar::from_i8(left_res), &left_dest)?; + this.write_scalar(Scalar::from_i8(right_res), &right_dest)?; } } // Used to implement the _mm_packus_epi16 function. @@ -487,11 +487,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { let right_res = i16::try_from(right).unwrap_or(if right < 0 { i16::MIN } else { i16::MAX }); - this.write_scalar(Scalar::from_i16(left_res.try_into().unwrap()), &left_dest)?; - this.write_scalar( - Scalar::from_i16(right_res.try_into().unwrap()), - &right_dest, - )?; + this.write_scalar(Scalar::from_i16(left_res), &left_dest)?; + this.write_scalar(Scalar::from_i16(right_res), &right_dest)?; } } // Used to implement _mm_min_sd and _mm_max_sd functions. |
