diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index 72d79628e76b1b5015b580b8725d9944ff8014ef..28c00a184d006bfbe61ea7d81bb3db8a785a7af4 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -10,3 +10,15 @@ # references = ["smithy-rs#920"] # meta = { "breaking" = false, "tada" = false, "bug" = false } # author = "rcoh" + +[[aws-sdk-rust]] +message = "Bump [MSRV](https://github.com/awslabs/aws-sdk-rust#supported-rust-versions-msrv) from 1.56.1 to 1.58.1 per our \"two versions behind\" policy." +references = ["smithy-rs#1318"] +meta = { "breaking" = true, "tada" = false, "bug" = false } +author = "Velfi" + +[[smithy-rs]] +message = "Bump [MSRV](https://github.com/awslabs/aws-sdk-rust#supported-rust-versions-msrv) from 1.56.1 to 1.58.1 per our \"two versions behind\" policy." +references = ["smithy-rs#1318"] +meta = { "breaking" = true, "tada" = false, "bug" = false } +author = "Velfi" diff --git a/aws/rust-runtime/aws-config/src/ecs.rs b/aws/rust-runtime/aws-config/src/ecs.rs index 4b7f1f487a815541a0640a3b43d8fab760e47a84..4f9c38e291499e5a0321a4c7516405e3de3d63ce 100644 --- a/aws/rust-runtime/aws-config/src/ecs.rs +++ b/aws/rust-runtime/aws-config/src/ecs.rs @@ -131,6 +131,7 @@ impl ProvideCredentials for EcsCredentialsProvider { /// Inner Provider that can record failed configuration state #[derive(Debug)] +#[allow(clippy::large_enum_variant)] enum Provider { Configured(HttpCredentialProvider), NotConfigured, diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs b/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs index 1d647aaeb1a44972eb3d26290eb4b7958157a229..7bb07d14b42066c1c93f58cb0b75d4cf0ae5780e 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs @@ -480,7 +480,7 @@ impl<'a> fmt::Display for StringToSign<'a> { "{}\n{}\n{}\n{}", HMAC_256, format_date_time(self.time), - self.scope.to_string(), + self.scope, self.hashed_creq ) } diff --git a/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs b/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs index 3f83779336592eeced2966e0710ff824fb85c557..ac0f8e8648e119aaaa0d9b84606630048130a2cd 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs @@ -287,7 +287,7 @@ fn build_authorization_header( "{} Credential={}/{}, SignedHeaders={}, Signature={}", HMAC_256, access_key, - sts.scope.to_string(), + sts.scope, creq.values.signed_headers().as_str(), signature )) diff --git a/aws/sdk/integration-tests/transcribestreaming/tests/test.rs b/aws/sdk/integration-tests/transcribestreaming/tests/test.rs index f6728f6f336cb13860ab9e7bbf906888f1b3e9cc..ac7678386650526ccbb3f7c576c9cf9cfff12071 100644 --- a/aws/sdk/integration-tests/transcribestreaming/tests/test.rs +++ b/aws/sdk/integration-tests/transcribestreaming/tests/test.rs @@ -39,7 +39,7 @@ async fn test_success() { match event { TranscriptResultStream::TranscriptEvent(transcript_event) => { let transcript = transcript_event.transcript.unwrap(); - for result in transcript.results.unwrap_or_else(|| Vec::new()) { + for result in transcript.results.unwrap_or_else(Vec::new) { if !result.is_partial { let first_alternative = &result.alternatives.as_ref().unwrap()[0]; full_message += first_alternative.transcript.as_ref().unwrap(); diff --git a/gradle.properties b/gradle.properties index 3ff3df6f0238aa77409c5d953275b94551dd0658..34f9708fc040bf8cdf66aecf3ff6a0980f0dab4c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ # # Rust MSRV (entered into the generated README) -rust.msrv=1.56.1 +rust.msrv=1.58.1 # Version number to use for the generated SDK # Note: these must always be full 3-segment semver versions diff --git a/rust-runtime/aws-smithy-json/src/serialize.rs b/rust-runtime/aws-smithy-json/src/serialize.rs index affbccb2515e658eee5779e0086e85b9282df7bc..8fb5ef2aeffd56d23bc288a7be75725a53332eab 100644 --- a/rust-runtime/aws-smithy-json/src/serialize.rs +++ b/rust-runtime/aws-smithy-json/src/serialize.rs @@ -144,7 +144,7 @@ impl<'a> JsonObjectWriter<'a> { self.json.push_str(&escape_string(key)); self.json.push_str("\":"); - JsonValueWriter::new(&mut self.json) + JsonValueWriter::new(self.json) } /// Finishes the object. @@ -170,7 +170,7 @@ impl<'a> JsonArrayWriter<'a> { /// Starts a new value in the array. pub fn value(&mut self) -> JsonValueWriter { self.comma_delimit(); - JsonValueWriter::new(&mut self.json) + JsonValueWriter::new(self.json) } /// Finishes the array. diff --git a/rust-runtime/aws-smithy-xml/src/decode.rs b/rust-runtime/aws-smithy-xml/src/decode.rs index fa5fcfcaadb9eea6d7b45369ba57bf8b6ee4c475..2518212b5f7df1aa97e89cbc83eb58f93c56c3e5 100644 --- a/rust-runtime/aws-smithy-xml/src/decode.rs +++ b/rust-runtime/aws-smithy-xml/src/decode.rs @@ -300,7 +300,7 @@ impl<'inp> ScopedDecoder<'inp, '_> { fn nested_decoder<'a>(&'a mut self, start_el: StartEl<'inp>) -> ScopedDecoder<'inp, 'a> { ScopedDecoder { - doc: &mut self.doc, + doc: self.doc, start_el, terminated: false, } diff --git a/rust-runtime/inlineable/src/json_errors.rs b/rust-runtime/inlineable/src/json_errors.rs index edf52fe3fe003f5ef4db1f2bd3988c151fcce82c..a6a532e3e143aa440a2ee2f765ddc0a71e9e51c8 100644 --- a/rust-runtime/inlineable/src/json_errors.rs +++ b/rust-runtime/inlineable/src/json_errors.rs @@ -98,7 +98,7 @@ pub fn parse_generic_error( if let Some(code) = error_type_from_header(headers) .map_err(|_| DeserializeError::custom("X-Amzn-Errortype header was not valid UTF-8"))? .or_else(|| code.as_deref()) - .map(|c| sanitize_error_code(c)) + .map(sanitize_error_code) { err_builder.code(code); } diff --git a/tools/Dockerfile b/tools/Dockerfile index 937a337bfda7e498a3cfc70ca7167f227fa9af3e..158a612df31db5fb763ccf0dccfcdc7574f52236 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -38,7 +38,7 @@ RUN set -eux; \ # Rust & Tools Installation Stage # FROM bare_base_image AS install_rust -ARG rust_stable_version=1.56.1 +ARG rust_stable_version=1.58.1 ARG rust_nightly_version=nightly-2022-03-29 ARG cargo_udeps_version=0.1.27 ARG cargo_hack_version=0.5.12 @@ -95,7 +95,7 @@ RUN set -eux; \ # Final image # FROM bare_base_image AS final_image -ARG rust_stable_version=1.56.1 +ARG rust_stable_version=1.58.1 ARG rust_nightly_version=nightly-2022-03-29 RUN set -eux; \ yum -y updateinfo; \ diff --git a/tools/ci-cdk/canary-lambda/src/transcribe_canary.rs b/tools/ci-cdk/canary-lambda/src/transcribe_canary.rs index e7a9951090568d3e81eb522d3c9b4e02cd2a410a..6821fcb9af67ad537d769dfb6e10d66c3f8df90b 100644 --- a/tools/ci-cdk/canary-lambda/src/transcribe_canary.rs +++ b/tools/ci-cdk/canary-lambda/src/transcribe_canary.rs @@ -48,7 +48,7 @@ pub async fn transcribe_canary( match event { TranscriptResultStream::TranscriptEvent(transcript_event) => { let transcript = transcript_event.transcript.unwrap(); - for result in transcript.results.unwrap_or_else(|| Vec::new()) { + for result in transcript.results.unwrap_or_else(Vec::new) { if !result.is_partial { let first_alternative = &result.alternatives.as_ref().unwrap()[0]; full_message += first_alternative.transcript.as_ref().unwrap(); diff --git a/tools/sdk-lints/src/copyright.rs b/tools/sdk-lints/src/copyright.rs index 103e7406b4dc4bb2961f5c60a135c113474fca62..c3bb6231773c7914a52627cd0535da287029422c 100644 --- a/tools/sdk-lints/src/copyright.rs +++ b/tools/sdk-lints/src/copyright.rs @@ -59,7 +59,7 @@ fn check_copyright_header(path: impl AsRef) -> Vec { } fn needs_copyright_header(path: &Path) -> bool { - let mut need_extensions = NEEDS_HEADER.iter().map(|s| OsStr::new(s)); + let mut need_extensions = NEEDS_HEADER.iter().map(OsStr::new); need_extensions.any(|extension| path.extension().unwrap_or_default() == extension) } diff --git a/tools/sdk-versioner/Cargo.lock b/tools/sdk-versioner/Cargo.lock index b9fefa6c23fd53f09d63ceb853d0fae734deb66c..ffaf85e4957759ee01740f6767fb975fc11e431b 100644 --- a/tools/sdk-versioner/Cargo.lock +++ b/tools/sdk-versioner/Cargo.lock @@ -283,6 +283,20 @@ name = "serde" version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.133" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "smithy-rs-tool-common" @@ -290,6 +304,7 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", + "serde", "tracing", ]