diff --git a/crates/five8/src/avx.rs b/crates/five8/src/avx.rs index 9c638b9..ffdeeae 100644 --- a/crates/five8/src/avx.rs +++ b/crates/five8/src/avx.rs @@ -423,14 +423,14 @@ mod tests { for i in 0..90 { in_.0[16 * (i / 10) + (i % 10)] = i as u8 + 1; } - let in_ptr = in_.0.as_ptr() as *const u8; + let in_ptr = in_.0.as_ptr(); let a = wuc_ld(in_ptr); let b = wuc_ld(unsafe { in_ptr.offset(32) }); let c = wuc_ld(unsafe { in_ptr.offset(64) }); let d = wuc_ld(unsafe { in_ptr.offset(96) }); let e = wuc_ld(unsafe { in_ptr.offset(128) }); let (out0, out1, out2) = ten_per_slot_down_64(a, b, c, d, e); - let out_ptr = out.0.as_mut_ptr() as *mut u8; + let out_ptr = out.0.as_mut_ptr(); wuc_st(out_ptr, out0); wuc_st(unsafe { out_ptr.offset(32) }, out1); wuc_st(unsafe { out_ptr.offset(64) }, out2); diff --git a/crates/five8/src/decode.rs b/crates/five8/src/decode.rs index 98770d6..3a3caf6 100644 --- a/crates/five8/src/decode.rs +++ b/crates/five8/src/decode.rs @@ -357,7 +357,7 @@ mod tests { 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0, 1, 0, 0, 0, 0, 0, 127, ]; let mut out = [0u8; 32]; - let err = decode_32(&encoded, &mut out).unwrap_err(); + let err = decode_32(encoded, &mut out).unwrap_err(); assert_eq!(err, DecodeError::InvalidChar(0)); } diff --git a/crates/five8/src/encode.rs b/crates/five8/src/encode.rs index 7494f95..e432ffc 100644 --- a/crates/five8/src/encode.rs +++ b/crates/five8/src/encode.rs @@ -845,7 +845,7 @@ mod tests { expected_len: u8, encoded: &str, ) { - assert_eq!(&encode_32_to_string(&bytes, len, buf), encoded); + assert_eq!(&encode_32_to_string(bytes, len, buf), encoded); assert_eq!(*len, expected_len); let mut decoded = [0u8; 32]; decode_32(encoded.as_bytes(), &mut decoded).unwrap(); @@ -859,7 +859,7 @@ mod tests { expected_len: u8, encoded: &str, ) { - assert_eq!(&encode_64_to_string(&bytes, len, buf), encoded); + assert_eq!(&encode_64_to_string(bytes, len, buf), encoded); assert_eq!(*len, expected_len); let mut decoded = [0u8; 64]; decode_64(encoded.as_bytes(), &mut decoded).unwrap(); @@ -871,7 +871,7 @@ mod tests { len: &mut u8, buf: &mut [u8; BASE58_ENCODED_64_MAX_LEN], ) -> String { - encode_64(&bytes, Some(len), buf); + encode_64(bytes, Some(len), buf); buf[..*len as usize].iter().map(|c| *c as char).collect() }