Skip to content

Commit f8bf67d

Browse files
rursprungeldruin
authored andcommitted
use pointer::add instead of pointer::offset (fix clippy warning)
for details see [the clippy warning](https://rust-lang.github.io/rust-clippy/master/index.html#/ptr_offset_with_cast).
1 parent 11bd6e0 commit f8bf67d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/murmur3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl core::hash::Hasher for Hasher {
137137
let mid = 4 - index;
138138
let head = unsafe { slice::from_raw_parts(bytes.as_ptr(), mid) };
139139
let body = unsafe {
140-
slice::from_raw_parts(bytes.as_ptr().offset(mid as isize), len - mid)
140+
slice::from_raw_parts(bytes.as_ptr().add(mid), len - mid)
141141
};
142142

143143
// NOTE(unsafe) avoid calling `memcpy` on a 0-3 byte copy

0 commit comments

Comments
 (0)