Skip to content

Commit d00adf4

Browse files
authored
Merge pull request #4429 from tgross35/lint-fixes
Fix an `unnecessary_transmutes` from a recent nightly
2 parents e8b0152 + 673af93 commit d00adf4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/unix/linux_like/linux/gnu/b64/s390x.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ cfg_if! {
235235

236236
impl hash::Hash for fpreg_t {
237237
fn hash<H: hash::Hasher>(&self, state: &mut H) {
238-
let d: u64 = unsafe { mem::transmute(self.d) };
238+
let d: u64 = self.d.to_bits();
239239
d.hash(state);
240240
}
241241
}

src/unix/linux_like/linux/musl/b64/s390x.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ cfg_if! {
8888

8989
impl hash::Hash for fpreg_t {
9090
fn hash<H: hash::Hasher>(&self, state: &mut H) {
91-
let d: u64 = unsafe { mem::transmute(self.d) };
91+
let d: u64 = self.d.to_bits();
9292
d.hash(state);
9393
}
9494
}

0 commit comments

Comments
 (0)