Skip to content

Commit

Permalink
Adding arch based cfgs to crc64 checksum for x86
Browse files Browse the repository at this point in the history
The crc64fast-nvme crate uses some 64 bit intrinsics that do not exist
on 32 bit x86
  • Loading branch information
landonxjames committed Dec 2, 2024
1 parent 4b25bdd commit 09aeece
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions rust-runtime/aws-smithy-checksums/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 09aeece

Please sign in to comment.