Skip to content

Commit 6987168

Browse files
committed
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.
1 parent d4c11dd commit 6987168

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

rust-runtime/aws-smithy-checksums/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aws-smithy-checksums"
3-
version = "0.63.9"
3+
version = "0.63.10"
44
authors = [
55
"AWS Rust SDK Team <aws-sdk-rust@amazon.com>",
66
"Zelda Hessler <zhessler@amazon.com>",

rust-runtime/aws-smithy-checksums/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ impl Sha1 {
266266

267267
fn finalize(self) -> Bytes {
268268
use sha1::Digest;
269-
Bytes::copy_from_slice(self.hasher.finalize().as_slice())
269+
Bytes::copy_from_slice(self.hasher.finalize().as_ref())
270270
}
271271

272272
// Size of the checksum in bytes
@@ -302,7 +302,7 @@ impl Sha256 {
302302

303303
fn finalize(self) -> Bytes {
304304
use sha2::Digest;
305-
Bytes::copy_from_slice(self.hasher.finalize().as_slice())
305+
Bytes::copy_from_slice(self.hasher.finalize().as_ref())
306306
}
307307

308308
// Size of the checksum in bytes
@@ -340,7 +340,7 @@ impl Md5 {
340340
#[warn(dead_code)]
341341
fn finalize(self) -> Bytes {
342342
use md5::Digest;
343-
Bytes::copy_from_slice(self.hasher.finalize().as_slice())
343+
Bytes::copy_from_slice(self.hasher.finalize().as_ref())
344344
}
345345

346346
// Size of the checksum in bytes

0 commit comments

Comments
 (0)