Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: MSRV from 1.56.1 to 1.58.1 #1325

Merged
merged 5 commits into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 1 addition & 0 deletions aws/rust-runtime/aws-config/src/ecs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ impl ProvideCredentials for EcsCredentialsProvider {

/// Inner Provider that can record failed configuration state
#[derive(Debug)]
#[allow(clippy::large_enum_variant)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How big is it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

432 bytes, the next largest is 56 bytes. Clippy recommends boxing it.

enum Provider {
Configured(HttpCredentialProvider),
NotConfigured,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}
Expand Down
2 changes: 1 addition & 1 deletion aws/rust-runtime/aws-sigv4/src/http_request/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions rust-runtime/aws-smithy-json/src/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion rust-runtime/aws-smithy-xml/src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
2 changes: 1 addition & 1 deletion rust-runtime/inlineable/src/json_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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; \
Expand Down
2 changes: 1 addition & 1 deletion tools/ci-cdk/canary-lambda/src/transcribe_canary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion tools/sdk-lints/src/copyright.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn check_copyright_header(path: impl AsRef<Path>) -> Vec<LintError> {
}

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)
}

Expand Down
15 changes: 15 additions & 0 deletions tools/sdk-versioner/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.