Skip to content

Commit a9aeece

Browse files
authored
Fix Rust 1.82 lint warnings in client runtime / SDK crates (#4126)
## Motivation and Context Address warnings in client runtime / SDK crates as listed in #4122 ## Description `TODO(MSRV1.82 follow-up)` are retained, since warnings coming from the server runtime crates need to be addressed as well. ## Testing No lint warnings are generated with the changes. ``` aws-config git:(ysaito/fix-msrv-1-82-lint-warning) ✗ RUSTFLAGS="-Dwarnings" cargo clippy --all-features ... Finished `dev` profile [unoptimized + debuginfo] target(s) in 35.80s ``` ``` aws-sigv4 git:(ysaito/fix-msrv-1-82-lint-warning) ✗ RUSTFLAGS="-Dwarnings" cargo clippy --all-features ... Finished `dev` profile [unoptimized + debuginfo] target(s) in 41.40s ``` ``` s3 git:(ysaito/fix-msrv-1-82-lint-warning) ✗ RUSTDOCFLAGS='--cfg docsrs -Dwarnings' cargo +nightly-2025-05-04 doc --no-deps --document-private-items --all-features ... Finished `dev` profile [unoptimized + debuginfo] target(s) in 16.16s ``` ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
1 parent d8ba5d3 commit a9aeece

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

aws/rust-runtime/aws-config/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-config"
3-
version = "1.6.2"
3+
version = "1.6.3"
44
authors = [
55
"AWS Rust SDK Team <aws-sdk-rust@amazon.com>",
66
"Russell Cohen <rcoh@amazon.com>",

aws/rust-runtime/aws-config/src/meta/credentials/chain.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,8 @@ impl ProvideCredentials for CredentialsProviderChain {
123123

124124
fn fallback_on_interrupt(&self) -> Option<Credentials> {
125125
for (_, provider) in &self.providers {
126-
match provider.fallback_on_interrupt() {
127-
creds @ Some(_) => return creds,
128-
None => {}
126+
if let creds @ Some(_) = provider.fallback_on_interrupt() {
127+
return creds;
129128
}
130129
}
131130
None

aws/rust-runtime/aws-sigv4/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-sigv4"
3-
version = "1.3.1"
3+
version = "1.3.2"
44
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "David Barsky <me@davidbarsky.com>"]
55
description = "SigV4 signer for HTTP requests and Event Stream messages."
66
edition = "2021"

aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ impl<'a> SignatureValues<'a> {
101101
}
102102
}
103103

104+
#[allow(clippy::result_large_err)]
105+
/*
106+
QueryParams(QueryParamValues<'a>),
107+
--------------------------------- the largest variant contains at least 192 bytes
108+
109+
Suppressing the Clippy warning, as the variant above is always returned wrapped in `Ok`.
110+
*/
104111
pub(crate) fn into_query_params(self) -> Result<QueryParamValues<'a>, Self> {
105112
match self {
106113
SignatureValues::QueryParams(values) => Ok(values),

codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/customizations/AllowLintsCustomization.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ private val allowedRustdocLints =
5757
// Rustdoc warns about redundant explicit links in doc comments. This is fine for handwritten
5858
// crates, but is impractical to manage for code generated crates. Thus, allow it.
5959
"redundant_explicit_links",
60+
// The documentation directly from the model may contain invalid HTML tags. For instance,
61+
// <p><code><bucketloggingstatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" /></code></p>
62+
// is considered an invalid self-closing HTML tag `bucketloggingstatus`
63+
"invalid_html_tags",
6064
)
6165

6266
class AllowLintsCustomization(

0 commit comments

Comments
 (0)