From 6987168fc56a63611580fa84ec2d340884b049b0 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Mon, 13 Oct 2025 12:15:44 -0400 Subject: [PATCH] Fix deprecated as_slice() calls in aws-smithy-checksums Replace deprecated as_slice() method calls with as_ref() to resolve deprecation warnings from generic-array upgrade. This affects SHA1, SHA256, and MD5 checksum implementations. Fixes compilation warnings: - error: use of deprecated method GenericArray::as_slice - help: please upgrade to generic-array 1.x Bumps version from 0.63.9 to 0.63.10. --- rust-runtime/aws-smithy-checksums/Cargo.toml | 2 +- rust-runtime/aws-smithy-checksums/src/lib.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rust-runtime/aws-smithy-checksums/Cargo.toml b/rust-runtime/aws-smithy-checksums/Cargo.toml index b473e7f66fc..8180f9e3830 100644 --- a/rust-runtime/aws-smithy-checksums/Cargo.toml +++ b/rust-runtime/aws-smithy-checksums/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-smithy-checksums" -version = "0.63.9" +version = "0.63.10" authors = [ "AWS Rust SDK Team ", "Zelda Hessler ", diff --git a/rust-runtime/aws-smithy-checksums/src/lib.rs b/rust-runtime/aws-smithy-checksums/src/lib.rs index b9b9d4de1e3..5aca86fe251 100644 --- a/rust-runtime/aws-smithy-checksums/src/lib.rs +++ b/rust-runtime/aws-smithy-checksums/src/lib.rs @@ -266,7 +266,7 @@ impl Sha1 { fn finalize(self) -> Bytes { use sha1::Digest; - Bytes::copy_from_slice(self.hasher.finalize().as_slice()) + Bytes::copy_from_slice(self.hasher.finalize().as_ref()) } // Size of the checksum in bytes @@ -302,7 +302,7 @@ impl Sha256 { fn finalize(self) -> Bytes { use sha2::Digest; - Bytes::copy_from_slice(self.hasher.finalize().as_slice()) + Bytes::copy_from_slice(self.hasher.finalize().as_ref()) } // Size of the checksum in bytes @@ -340,7 +340,7 @@ impl Md5 { #[warn(dead_code)] fn finalize(self) -> Bytes { use md5::Digest; - Bytes::copy_from_slice(self.hasher.finalize().as_slice()) + Bytes::copy_from_slice(self.hasher.finalize().as_ref()) } // Size of the checksum in bytes