Skip to content

Commit

Permalink
[smithy-rs] Upgrade to Rust 1.62.0 (#1825)
Browse files Browse the repository at this point in the history
* Run clippy --fix for Rust 1.62.0 and format the resulting code

* Run clippy --fix on all targets

* Run clippy --fix with all features enabled

* Avoid extra allocation

* Use more idiomatic assert

* Ignore noisy lint

* Update pyo3 and pyo3-asyncio to 0.17.0

* Implement Eq on aws-smithy-checksums::Error

* Implement Eq on Protocol

* Replace conditionals with range-containment

* Implement Eq on types in aws-smithy-types

* Implement Eq on types in aws-smithy-http-server-python

* Implement Eq on types in aws-smithy-eventstream

* Implement Eq on types in aws-smithy-xml

* Implement Eq on aws-sigv4

* Update CI to use Rust 1.62.0

* Add Eq for generated types that implement PartialEq

* Allow clippy::needless_return in generated code

* Remove unnecessary reborrow in http_serde

* Remove unnecessary borrow in operation_deser

* Add CHANGELOG entries

* Revert "Add Eq for generated types that implement PartialEq"

This reverts commit 5169bd95aa4dbbfc77c23bf7415e98ebc6361733.

* Update pyo3 and pyo3-asyncio in generated code for python server

* Allow clippy::derive_partial_eq_without_eq on structs and builders

* Run clippy on tools

* Fix accidental move in generated code

* Revert "Allow clippy::derive_partial_eq_without_eq on structs and builders"

This reverts commit 068c63ca2030879584e7b602bd0648abab19cabe.

* Fix another accidental move in generated code

* Undo unwanted change to model

* Re-add reborrow in HttpBindingGenerator

* Fix clippy::format-push-string in changelogger

* Fix more uses of str.push_str(&format!(...))

* Remove unnecessary parenthesis

* Run ktlint

* Update aws/rust-runtime/aws-http/src/content_encoding.rs

Co-authored-by: John DiSanti <jdisanti@amazon.com>

* Update aws/rust-runtime/aws-http/src/content_encoding.rs

Co-authored-by: John DiSanti <jdisanti@amazon.com>

* Ignore doctest for non-exported macro

Rust 1.62 introduced a breaking change where doctests for non-exported
macros are now run by default. These don't compile because the macro
can't be imported in it.
See rust-lang/rust#97030 for more info.

* Run cargo fmt

* Use $crate instead of crate in macro

* Revert "Implement Eq on types in aws-smithy-types"

This reverts commit c45a6b5a56d391923efce3c884291c330218982d.

* Revert "Implement Eq on types in aws-smithy-eventstream"

This reverts commit 78f4b07344d2cbb9d06b30ffd9bad16031fdd83b.

* Revert "Implement Eq on types in aws-smithy-xml"

This reverts commit 590f01af7326bde7de97cae97feeedf593b9239b.

* Revert "Implement Eq on aws-sigv4"

This reverts commit d78bb62124c4b3a24a35bdd655995de11252d17f.

* Revert "Implement Eq on types in aws-smithy-http-server-python"

This reverts commit f2cd9018844130d441820742dc1cf1c7abeaa38b.

* Revert "Implement Eq on aws-smithy-checksums::Error"

This reverts commit 5da170405e12d5077f67b8f8e41c2319138244d4.

Co-authored-by: Julian Antonielli <julianantonielli@gmail.com>
Co-authored-by: John DiSanti <jdisanti@amazon.com>
  • Loading branch information
3 people authored and aws-sdk-rust-ci committed Oct 26, 2022
1 parent 6892086 commit 7a46124
Show file tree
Hide file tree
Showing 652 changed files with 51,765 additions and 51,452 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This README file is auto-generated by the build system in awslabs/smithy-rs.
To update it, edit the `aws/SDK_README.md.hb` Handlebars template in that repository.
-->

# The AWS SDK for Rust [![Docs](https://img.shields.io/badge/docs-blue)](https://awslabs.github.io/aws-sdk-rust/) ![MSRV](https://img.shields.io/badge/msrv-1.61.0-red) [![Usage Guide](https://img.shields.io/badge/Developer_Guide-blue)](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html)
# The AWS SDK for Rust [![Docs](https://img.shields.io/badge/docs-blue)](https://awslabs.github.io/aws-sdk-rust/) ![MSRV](https://img.shields.io/badge/msrv-1.62.0-red) [![Usage Guide](https://img.shields.io/badge/Developer_Guide-blue)](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html)

This repo contains the new AWS SDK for Rust (the SDK) and its [public roadmap](https://github.com/orgs/awslabs/projects/50/views/1).

Expand Down Expand Up @@ -82,7 +82,7 @@ If you are interested in contributing to the SDK, please take a look at [CONTRIB

## Supported Rust Versions (MSRV)

The SDK currently requires a minimum of Rust 1.61.0, and is not guaranteed to build on compiler versions earlier than that. While we are still in alpha, we will be keeping the minimum compiler version two releases behind the latest stable release where possible (so if the latest stable were 1.55, we would be on 1.53). However, we are not making any guarantees around this at present. Increases in minimum required Rust version will be called out in the Release Notes for new releases of the SDK.
The SDK currently requires a minimum of Rust 1.62.0, and is not guaranteed to build on compiler versions earlier than that. While we are still in alpha, we will be keeping the minimum compiler version two releases behind the latest stable release where possible (so if the latest stable were 1.55, we would be on 1.53). However, we are not making any guarantees around this at present. Increases in minimum required Rust version will be called out in the Release Notes for new releases of the SDK.

## Additional Resources

Expand Down
1 change: 1 addition & 0 deletions sdk/accessanalyzer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#![allow(clippy::blacklisted_name)]
#![allow(clippy::vec_init_then_push)]
#![allow(clippy::type_complexity)]
#![allow(clippy::needless_return)]
#![allow(rustdoc::bare_urls)]
#![warn(missing_docs)]
//! <p>Identity and Access Management Access Analyzer helps identify potential resource-access risks by enabling you to
Expand Down
282 changes: 141 additions & 141 deletions sdk/accessanalyzer/src/operation_deser.rs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions sdk/account/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#![allow(clippy::blacklisted_name)]
#![allow(clippy::vec_init_then_push)]
#![allow(clippy::type_complexity)]
#![allow(clippy::needless_return)]
#![allow(rustdoc::bare_urls)]
#![warn(missing_docs)]
//! <p>Operations for Amazon Web Services Account Management</p>
Expand Down
46 changes: 23 additions & 23 deletions sdk/account/src/operation_deser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub fn parse_delete_alternate_contact_error(
output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAlternateContactError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -47,7 +47,7 @@ pub fn parse_delete_alternate_contact_error(
output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAlternateContactError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -64,7 +64,7 @@ pub fn parse_delete_alternate_contact_error(
output = crate::json_deser::deser_structure_crate_error_resource_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAlternateContactError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -81,7 +81,7 @@ pub fn parse_delete_alternate_contact_error(
output = crate::json_deser::deser_structure_crate_error_too_many_requests_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAlternateContactError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -98,7 +98,7 @@ pub fn parse_delete_alternate_contact_error(
output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAlternateContactError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand Down Expand Up @@ -150,7 +150,7 @@ pub fn parse_get_alternate_contact_error(
output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetAlternateContactError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -167,7 +167,7 @@ pub fn parse_get_alternate_contact_error(
output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetAlternateContactError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -184,7 +184,7 @@ pub fn parse_get_alternate_contact_error(
output = crate::json_deser::deser_structure_crate_error_resource_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetAlternateContactError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -201,7 +201,7 @@ pub fn parse_get_alternate_contact_error(
output = crate::json_deser::deser_structure_crate_error_too_many_requests_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetAlternateContactError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -218,7 +218,7 @@ pub fn parse_get_alternate_contact_error(
output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetAlternateContactError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand Down Expand Up @@ -275,7 +275,7 @@ pub fn parse_get_contact_information_error(
output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetContactInformationError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -292,7 +292,7 @@ pub fn parse_get_contact_information_error(
output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetContactInformationError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -309,7 +309,7 @@ pub fn parse_get_contact_information_error(
output = crate::json_deser::deser_structure_crate_error_resource_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetContactInformationError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -326,7 +326,7 @@ pub fn parse_get_contact_information_error(
output = crate::json_deser::deser_structure_crate_error_too_many_requests_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetContactInformationError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -343,7 +343,7 @@ pub fn parse_get_contact_information_error(
output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetContactInformationError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand Down Expand Up @@ -400,7 +400,7 @@ pub fn parse_put_alternate_contact_error(
output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutAlternateContactError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -417,7 +417,7 @@ pub fn parse_put_alternate_contact_error(
output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutAlternateContactError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -434,7 +434,7 @@ pub fn parse_put_alternate_contact_error(
output = crate::json_deser::deser_structure_crate_error_too_many_requests_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutAlternateContactError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -451,7 +451,7 @@ pub fn parse_put_alternate_contact_error(
output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutAlternateContactError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand Down Expand Up @@ -503,7 +503,7 @@ pub fn parse_put_contact_information_error(
output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutContactInformationError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -520,7 +520,7 @@ pub fn parse_put_contact_information_error(
output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutContactInformationError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -537,7 +537,7 @@ pub fn parse_put_contact_information_error(
output = crate::json_deser::deser_structure_crate_error_too_many_requests_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutContactInformationError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand All @@ -554,7 +554,7 @@ pub fn parse_put_contact_information_error(
output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutContactInformationError::unhandled)?;
output.build()
};
if (&tmp.message).is_none() {
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
Expand Down
1 change: 1 addition & 0 deletions sdk/acm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#![allow(clippy::blacklisted_name)]
#![allow(clippy::vec_init_then_push)]
#![allow(clippy::type_complexity)]
#![allow(clippy::needless_return)]
#![allow(rustdoc::bare_urls)]
#![warn(missing_docs)]
//! <fullname>Certificate Manager</fullname>
Expand Down
Loading

0 comments on commit 7a46124

Please sign in to comment.