Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Nugine committed Jan 10, 2024
1 parent ddbbea5 commit e6faaba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions crates/hex-simd/tests/it.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ fn random() {
}};
}

for (_, src) in ok_cases.iter().enumerate() {
for src in &ok_cases {
// for (_, src) in ok_cases.iter().enumerate() {
// dbgmsg!("ok case {}", i + 1);
assert!(hex_simd::check(src).is_ok());
if src.len() % 2 == 0 {
Expand All @@ -137,7 +138,8 @@ fn random() {
}
}

for (_, src) in err_cases.iter().enumerate() {
for src in &err_cases {
// for (_, src) in err_cases.iter().enumerate() {
// dbgmsg!("err case {}", i + 1);
assert!(hex_simd::check(src).is_err());
let mut buf = vec![0; src.len() / 2];
Expand Down
3 changes: 2 additions & 1 deletion crates/vsimd/src/hex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ mod algorithm {
)]
fn check() {
fn is_hex_v1(c: u8) -> bool {
matches!(c, b'0'..=b'9' | b'a'..=b'f' | b'A'..=b'F')
// matches!(c, b'0'..=b'9' | b'a'..=b'f' | b'A'..=b'F')
c.is_ascii_hexdigit()
}

fn is_hex_v2(c: u8) -> bool {
Expand Down
2 changes: 2 additions & 0 deletions crates/vsimd/src/vector.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(dead_code)] // FIXME: temp workaround

use core::mem::transmute;

// vectors should have `repr(simd)` if possible.
Expand Down

0 comments on commit e6faaba

Please sign in to comment.