diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a1e8f274d..f4208b271a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ on: required: false env: - rust_version: 1.68.2 + rust_version: 1.69.0 rust_toolchain_components: clippy,rustfmt ENCRYPTED_DOCKER_PASSWORD: ${{ secrets.ENCRYPTED_DOCKER_PASSWORD }} DOCKER_LOGIN_TOKEN_PASSPHRASE: ${{ secrets.DOCKER_LOGIN_TOKEN_PASSPHRASE }} diff --git a/.github/workflows/claim-crate-names.yml b/.github/workflows/claim-crate-names.yml index d6e105d45f..6f714a7671 100644 --- a/.github/workflows/claim-crate-names.yml +++ b/.github/workflows/claim-crate-names.yml @@ -10,7 +10,7 @@ concurrency: cancel-in-progress: true env: - rust_version: 1.68.2 + rust_version: 1.69.0 name: Claim unpublished crate names on crates.io run-name: ${{ github.workflow }} diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index c597e186c6..c15767baa1 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -8,7 +8,7 @@ on: name: Update GitHub Pages env: - rust_version: 1.68.2 + rust_version: 1.69.0 # Allow only one doc pages build to run at a time for the entire smithy-rs repo concurrency: diff --git a/.github/workflows/pull-request-bot.yml b/.github/workflows/pull-request-bot.yml index 28a5c8aea6..82fc80d975 100644 --- a/.github/workflows/pull-request-bot.yml +++ b/.github/workflows/pull-request-bot.yml @@ -28,7 +28,7 @@ concurrency: env: java_version: 11 - rust_version: 1.68.2 + rust_version: 1.69.0 rust_toolchain_components: clippy,rustfmt apt_dependencies: libssl-dev gnuplot jq diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 41a85393f8..7d33ceba4c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ concurrency: cancel-in-progress: true env: - rust_version: 1.68.2 + rust_version: 1.69.0 name: Release smithy-rs run-name: ${{ github.workflow }} ${{ inputs.semantic_version }} (${{ inputs.commit_sha }}) - ${{ inputs.dry_run && 'Dry run' || 'Production run' }} diff --git a/.github/workflows/update-sdk-next.yml b/.github/workflows/update-sdk-next.yml index 47a3af6221..155924020a 100644 --- a/.github/workflows/update-sdk-next.yml +++ b/.github/workflows/update-sdk-next.yml @@ -32,7 +32,7 @@ jobs: - name: Set up Rust uses: dtolnay/rust-toolchain@master with: - toolchain: 1.68.2 + toolchain: 1.69.0 - name: Delete old SDK run: | - name: Generate a fresh SDK diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index fd6119d965..a99d1f3afb 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -159,16 +159,16 @@ meta = { "breaking" = true, "tada" = false, "bug" = false } author = "ysaito1001" [[aws-sdk-rust]] -message = "Update MSRV to Rust 1.68.2" -references = ["smithy-rs#2745"] +message = "Update MSRV to Rust 1.69.0" +references = ["smithy-rs#2893"] meta = { "breaking" = true, "tada" = false, "bug" = false } -author = "jdisanti" +author = "Velfi" [[smithy-rs]] -message = "Update MSRV to Rust 1.68.2" -references = ["smithy-rs#2745"] +message = "Update MSRV to Rust 1.69.0" +references = ["smithy-rs#2893"] meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "all" } -author = "jdisanti" +author = "Velfi" [[smithy-rs]] message = """`ShapeId` is the new structure used to represent a shape, with its absolute name, namespace and name. diff --git a/aws/rust-runtime/aws-inlineable/src/endpoint_discovery.rs b/aws/rust-runtime/aws-inlineable/src/endpoint_discovery.rs index de870fecc9..498844f1b3 100644 --- a/aws/rust-runtime/aws-inlineable/src/endpoint_discovery.rs +++ b/aws/rust-runtime/aws-inlineable/src/endpoint_discovery.rs @@ -160,11 +160,11 @@ mod test { use crate::endpoint_discovery::create_cache; use aws_smithy_async::rt::sleep::{SharedAsyncSleep, TokioSleep}; use aws_smithy_async::test_util::controlled_time_and_sleep; - use aws_smithy_async::time::{SharedTimeSource, SystemTimeSource}; + use aws_smithy_async::time::{SharedTimeSource, SystemTimeSource, TimeSource}; use aws_smithy_types::endpoint::Endpoint; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Arc; - use std::time::{Duration, SystemTime, UNIX_EPOCH}; + use std::time::{Duration, UNIX_EPOCH}; use tokio::time::timeout; fn check_send_v(t: T) -> T { @@ -178,7 +178,7 @@ mod test { || async { Ok(( Endpoint::builder().url("http://foo.com").build(), - SystemTime::now(), + SystemTimeSource::new().now(), )) }, SharedAsyncSleep::new(TokioSleep::new()), diff --git a/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs b/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs index aff4e925e4..701a2e36a0 100644 --- a/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs +++ b/aws/rust-runtime/aws-inlineable/src/http_request_checksum.rs @@ -239,11 +239,8 @@ mod tests { let mut body = request.body().try_clone().expect("body is retryable"); let mut body_data = BytesMut::new(); - loop { - match body.data().await { - Some(data) => body_data.extend_from_slice(&data.unwrap()), - None => break, - } + while let Some(data) = body.data().await { + body_data.extend_from_slice(&data.unwrap()) } let body = std::str::from_utf8(&body_data).unwrap(); assert_eq!( @@ -290,11 +287,8 @@ mod tests { let mut body = request.body().try_clone().expect("body is retryable"); let mut body_data = BytesMut::new(); - loop { - match body.data().await { - Some(data) => body_data.extend_from_slice(&data.unwrap()), - None => break, - } + while let Some(data) = body.data().await { + body_data.extend_from_slice(&data.unwrap()) } let body = std::str::from_utf8(&body_data).unwrap(); let expected_checksum = base64::encode(&crc32c_checksum); 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 69d646daa2..aaeda06bb7 100644 --- a/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs +++ b/aws/rust-runtime/aws-sigv4/src/http_request/sign.rs @@ -611,7 +611,7 @@ mod tests { security_token: None, region: "us-east-1", service_name: "foo", - time: std::time::SystemTime::now(), + time: std::time::SystemTime::UNIX_EPOCH, settings, }; @@ -640,7 +640,7 @@ mod tests { security_token: None, region: "us-east-1", service_name: "foo", - time: std::time::SystemTime::now(), + time: std::time::SystemTime::UNIX_EPOCH, settings, }; diff --git a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt index 8f8e6ff8b5..0a4a52f839 100644 --- a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt @@ -111,7 +111,7 @@ object TestWorkspace { // help rust select the right version when we run cargo test // TODO(https://github.com/awslabs/smithy-rs/issues/2048): load this from the msrv property using a // method as we do for runtime crate versions - "[toolchain]\nchannel = \"1.68.2\"\n", + "[toolchain]\nchannel = \"1.69.0\"\n", ) // ensure there at least an empty lib.rs file to avoid broken crates newProject.resolve("src").mkdirs() diff --git a/gradle.properties b/gradle.properties index aa791db007..e00a00c97a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ # # Rust MSRV (entered into the generated README) -rust.msrv=1.68.2 +rust.msrv=1.69.0 # To enable debug, swap out the two lines below. # When changing this value, be sure to run `./gradlew --stop` to kill the Gradle daemon. diff --git a/rust-runtime/aws-smithy-http/src/middleware.rs b/rust-runtime/aws-smithy-http/src/middleware.rs index d3da9dac2d..3285dec872 100644 --- a/rust-runtime/aws-smithy-http/src/middleware.rs +++ b/rust-runtime/aws-smithy-http/src/middleware.rs @@ -112,7 +112,7 @@ where O: ParseHttpResponse>, { if let Some(parsed_response) = - debug_span!("parse_unloaded").in_scope(&mut || handler.parse_unloaded(&mut response)) + debug_span!("parse_unloaded").in_scope(|| handler.parse_unloaded(&mut response)) { trace!(response = ?response, "read HTTP headers for streaming response"); return sdk_result(parsed_response, response); diff --git a/rust-runtime/aws-smithy-runtime-api/src/client/identity.rs b/rust-runtime/aws-smithy-runtime-api/src/client/identity.rs index eec7c4e32c..27c4accf4e 100644 --- a/rust-runtime/aws-smithy-runtime-api/src/client/identity.rs +++ b/rust-runtime/aws-smithy-runtime-api/src/client/identity.rs @@ -121,7 +121,7 @@ impl Identity { } } -impl fmt::Debug for Identity { +impl Debug for Identity { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("Identity") .field("data", (self.data_debug)(&self.data)) @@ -133,6 +133,7 @@ impl fmt::Debug for Identity { #[cfg(test)] mod tests { use super::*; + use aws_smithy_async::time::{SystemTimeSource, TimeSource}; #[test] fn check_send_sync() { @@ -148,7 +149,8 @@ mod tests { last: String, } - let expiration = SystemTime::now(); + let ts = SystemTimeSource::new(); + let expiration = ts.now(); let identity = Identity::new( MyIdentityData { first: "foo".into(), diff --git a/rust-runtime/aws-smithy-runtime/src/client/orchestrator.rs b/rust-runtime/aws-smithy-runtime/src/client/orchestrator.rs index b86953dded..22bee36367 100644 --- a/rust-runtime/aws-smithy-runtime/src/client/orchestrator.rs +++ b/rust-runtime/aws-smithy-runtime/src/client/orchestrator.rs @@ -478,7 +478,7 @@ mod tests { .status(StatusCode::OK) .body(SdkBody::empty()) .map_err(|err| OrchestratorError::other(Box::new(err))) - .map(|res| Output::erase(res)), + .map(Output::erase), ) } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 864d3c411a..f2415f8315 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.68.2" +channel = "1.69.0" diff --git a/tools/ci-build/Dockerfile b/tools/ci-build/Dockerfile index d6ce780e65..f1e74fc79f 100644 --- a/tools/ci-build/Dockerfile +++ b/tools/ci-build/Dockerfile @@ -6,7 +6,7 @@ # This is the base Docker build image used by CI ARG base_image=public.ecr.aws/amazonlinux/amazonlinux:2 -ARG rust_stable_version=1.68.2 +ARG rust_stable_version=1.69.0 ARG rust_nightly_version=nightly-2023-05-31 FROM ${base_image} AS bare_base_image