Skip to content

Commit 75e4a9a

Browse files
committed
fix test compilation of swar on 32bit
1 parent 5ec9f60 commit 75e4a9a

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/simd/avx2.rs

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub(crate) unsafe fn match_uri_vectored(bytes: &[u8]) -> usize {
2626

2727
#[inline(always)]
2828
#[allow(non_snake_case, overflowing_literals)]
29+
#[allow(unused)]
2930
unsafe fn match_url_char_32_avx(buf: &[u8]) -> usize {
3031
debug_assert!(buf.len() >= 32);
3132

@@ -91,6 +92,7 @@ pub(crate) unsafe fn match_header_value_vectored(bytes: &[u8]) -> usize {
9192

9293
#[inline(always)]
9394
#[allow(non_snake_case)]
95+
#[allow(unused)]
9496
unsafe fn match_header_value_char_32_avx(buf: &[u8]) -> usize {
9597
debug_assert!(buf.len() >= 32);
9698

src/simd/swar.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,13 @@ fn test_is_header_value_block() {
190190
assert!(!is_header_value_block([b; BLOCK_SIZE]), "b={}", b);
191191
}
192192

193-
// A few sanity checks on non-uniform bytes for safe-measure
194-
assert!(!is_header_value_block(*b"foo.com\n"));
195-
assert!(!is_header_value_block(*b"o.com\r\nU"));
193+
194+
#[cfg(target_pointer_width = "64")]
195+
{
196+
// A few sanity checks on non-uniform bytes for safe-measure
197+
assert!(!is_header_value_block(*b"foo.com\n"));
198+
assert!(!is_header_value_block(*b"o.com\r\nU"));
199+
}
196200
}
197201

198202
#[test]

0 commit comments

Comments
 (0)