Skip to content

Commit d8fcc67

Browse files
newAMeldruin
authored andcommitted
treewide: fix clippy::ptr_as_ptr
1 parent 75d817e commit d8fcc67

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
4949
#![deny(missing_docs)]
5050
#![deny(warnings)]
51-
#![warn(clippy::use_self, clippy::doc_markdown)]
51+
#![warn(clippy::use_self, clippy::doc_markdown, clippy::ptr_as_ptr)]
5252
#![no_std]
5353

5454
use core::fmt;

src/murmur3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl core::hash::Hasher for Hasher {
176176
for block in body.chunks(4) {
177177
if block.len() == 4 {
178178
self.state
179-
.process_block(unsafe { &*(block.as_ptr() as *const _) });
179+
.process_block(unsafe { &*(block.as_ptr().cast()) });
180180
} else {
181181
// NOTE(unsafe) In this branch, `block.len() < 4`. For CASE 1 and CASE 2 above,
182182
// `self.index.usize()` will be 0 here, so `self.index.usize() + block.len() < 4`.

0 commit comments

Comments
 (0)