Skip to content

Commit

Permalink
fix clippy lint in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Jul 29, 2024
1 parent 836a202 commit 9a21c17
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crates/five8/src/avx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion crates/five8/src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
6 changes: 3 additions & 3 deletions crates/five8/src/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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()
}

Expand Down

0 comments on commit 9a21c17

Please sign in to comment.