From 09aeece896a2470fb9e4f908779631d4a020df09 Mon Sep 17 00:00:00 2001 From: Landon James Date: Mon, 2 Dec 2024 13:44:14 -0800 Subject: [PATCH] Adding arch based cfgs to crc64 checksum for x86 The crc64fast-nvme crate uses some 64 bit intrinsics that do not exist on 32 bit x86 --- rust-runtime/aws-smithy-checksums/src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rust-runtime/aws-smithy-checksums/src/lib.rs b/rust-runtime/aws-smithy-checksums/src/lib.rs index f4de97a84c..2d8dfc3593 100644 --- a/rust-runtime/aws-smithy-checksums/src/lib.rs +++ b/rust-runtime/aws-smithy-checksums/src/lib.rs @@ -359,11 +359,9 @@ mod tests { Crc32, Crc32c, Md5, Sha1, Sha256, }; + use crate::http::HttpChecksum; use crate::ChecksumAlgorithm; - use crate::{ - http::{HttpChecksum, CRC_64_NVME_HEADER_NAME}, - Crc64Nvme, - }; + use aws_smithy_types::base64; use http::HeaderValue; use pretty_assertions::assert_eq; @@ -415,6 +413,7 @@ mod tests { #[test] #[cfg(not(target_arch = "x86"))] fn test_crc64nvme_checksum() { + use crate::{http::CRC_64_NVME_HEADER_NAME, Crc64Nvme}; let mut checksum = Crc64Nvme::default(); checksum.update(TEST_DATA.as_bytes()); let checksum_result = Box::new(checksum).headers();