Skip to content

Commit 7a46124

Browse files
LukeMathWalkerjjantjdisanti
authored andcommitted
[smithy-rs] Upgrade to Rust 1.62.0 (#1825)
* 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 <[email protected]> * Update aws/rust-runtime/aws-http/src/content_encoding.rs Co-authored-by: John DiSanti <[email protected]> * 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 <[email protected]> Co-authored-by: John DiSanti <[email protected]>
1 parent 6892086 commit 7a46124

File tree

652 files changed

+51765
-51452
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

652 files changed

+51765
-51452
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This README file is auto-generated by the build system in awslabs/smithy-rs.
44
To update it, edit the `aws/SDK_README.md.hb` Handlebars template in that repository.
55
-->
66

7-
# 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)
7+
# 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)
88

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

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

8383
## Supported Rust Versions (MSRV)
8484

85-
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.
85+
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.
8686

8787
## Additional Resources
8888

sdk/accessanalyzer/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#![allow(clippy::blacklisted_name)]
88
#![allow(clippy::vec_init_then_push)]
99
#![allow(clippy::type_complexity)]
10+
#![allow(clippy::needless_return)]
1011
#![allow(rustdoc::bare_urls)]
1112
#![warn(missing_docs)]
1213
//! <p>Identity and Access Management Access Analyzer helps identify potential resource-access risks by enabling you to

sdk/accessanalyzer/src/operation_deser.rs

+141-141
Large diffs are not rendered by default.

sdk/account/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#![allow(clippy::blacklisted_name)]
88
#![allow(clippy::vec_init_then_push)]
99
#![allow(clippy::type_complexity)]
10+
#![allow(clippy::needless_return)]
1011
#![allow(rustdoc::bare_urls)]
1112
#![warn(missing_docs)]
1213
//! <p>Operations for Amazon Web Services Account Management</p>

sdk/account/src/operation_deser.rs

+23-23
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn parse_delete_alternate_contact_error(
3030
output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAlternateContactError::unhandled)?;
3131
output.build()
3232
};
33-
if (&tmp.message).is_none() {
33+
if tmp.message.is_none() {
3434
tmp.message = _error_message;
3535
}
3636
tmp
@@ -47,7 +47,7 @@ pub fn parse_delete_alternate_contact_error(
4747
output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAlternateContactError::unhandled)?;
4848
output.build()
4949
};
50-
if (&tmp.message).is_none() {
50+
if tmp.message.is_none() {
5151
tmp.message = _error_message;
5252
}
5353
tmp
@@ -64,7 +64,7 @@ pub fn parse_delete_alternate_contact_error(
6464
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)?;
6565
output.build()
6666
};
67-
if (&tmp.message).is_none() {
67+
if tmp.message.is_none() {
6868
tmp.message = _error_message;
6969
}
7070
tmp
@@ -81,7 +81,7 @@ pub fn parse_delete_alternate_contact_error(
8181
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)?;
8282
output.build()
8383
};
84-
if (&tmp.message).is_none() {
84+
if tmp.message.is_none() {
8585
tmp.message = _error_message;
8686
}
8787
tmp
@@ -98,7 +98,7 @@ pub fn parse_delete_alternate_contact_error(
9898
output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAlternateContactError::unhandled)?;
9999
output.build()
100100
};
101-
if (&tmp.message).is_none() {
101+
if tmp.message.is_none() {
102102
tmp.message = _error_message;
103103
}
104104
tmp
@@ -150,7 +150,7 @@ pub fn parse_get_alternate_contact_error(
150150
output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetAlternateContactError::unhandled)?;
151151
output.build()
152152
};
153-
if (&tmp.message).is_none() {
153+
if tmp.message.is_none() {
154154
tmp.message = _error_message;
155155
}
156156
tmp
@@ -167,7 +167,7 @@ pub fn parse_get_alternate_contact_error(
167167
output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetAlternateContactError::unhandled)?;
168168
output.build()
169169
};
170-
if (&tmp.message).is_none() {
170+
if tmp.message.is_none() {
171171
tmp.message = _error_message;
172172
}
173173
tmp
@@ -184,7 +184,7 @@ pub fn parse_get_alternate_contact_error(
184184
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)?;
185185
output.build()
186186
};
187-
if (&tmp.message).is_none() {
187+
if tmp.message.is_none() {
188188
tmp.message = _error_message;
189189
}
190190
tmp
@@ -201,7 +201,7 @@ pub fn parse_get_alternate_contact_error(
201201
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)?;
202202
output.build()
203203
};
204-
if (&tmp.message).is_none() {
204+
if tmp.message.is_none() {
205205
tmp.message = _error_message;
206206
}
207207
tmp
@@ -218,7 +218,7 @@ pub fn parse_get_alternate_contact_error(
218218
output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetAlternateContactError::unhandled)?;
219219
output.build()
220220
};
221-
if (&tmp.message).is_none() {
221+
if tmp.message.is_none() {
222222
tmp.message = _error_message;
223223
}
224224
tmp
@@ -275,7 +275,7 @@ pub fn parse_get_contact_information_error(
275275
output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetContactInformationError::unhandled)?;
276276
output.build()
277277
};
278-
if (&tmp.message).is_none() {
278+
if tmp.message.is_none() {
279279
tmp.message = _error_message;
280280
}
281281
tmp
@@ -292,7 +292,7 @@ pub fn parse_get_contact_information_error(
292292
output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetContactInformationError::unhandled)?;
293293
output.build()
294294
};
295-
if (&tmp.message).is_none() {
295+
if tmp.message.is_none() {
296296
tmp.message = _error_message;
297297
}
298298
tmp
@@ -309,7 +309,7 @@ pub fn parse_get_contact_information_error(
309309
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)?;
310310
output.build()
311311
};
312-
if (&tmp.message).is_none() {
312+
if tmp.message.is_none() {
313313
tmp.message = _error_message;
314314
}
315315
tmp
@@ -326,7 +326,7 @@ pub fn parse_get_contact_information_error(
326326
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)?;
327327
output.build()
328328
};
329-
if (&tmp.message).is_none() {
329+
if tmp.message.is_none() {
330330
tmp.message = _error_message;
331331
}
332332
tmp
@@ -343,7 +343,7 @@ pub fn parse_get_contact_information_error(
343343
output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GetContactInformationError::unhandled)?;
344344
output.build()
345345
};
346-
if (&tmp.message).is_none() {
346+
if tmp.message.is_none() {
347347
tmp.message = _error_message;
348348
}
349349
tmp
@@ -400,7 +400,7 @@ pub fn parse_put_alternate_contact_error(
400400
output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutAlternateContactError::unhandled)?;
401401
output.build()
402402
};
403-
if (&tmp.message).is_none() {
403+
if tmp.message.is_none() {
404404
tmp.message = _error_message;
405405
}
406406
tmp
@@ -417,7 +417,7 @@ pub fn parse_put_alternate_contact_error(
417417
output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutAlternateContactError::unhandled)?;
418418
output.build()
419419
};
420-
if (&tmp.message).is_none() {
420+
if tmp.message.is_none() {
421421
tmp.message = _error_message;
422422
}
423423
tmp
@@ -434,7 +434,7 @@ pub fn parse_put_alternate_contact_error(
434434
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)?;
435435
output.build()
436436
};
437-
if (&tmp.message).is_none() {
437+
if tmp.message.is_none() {
438438
tmp.message = _error_message;
439439
}
440440
tmp
@@ -451,7 +451,7 @@ pub fn parse_put_alternate_contact_error(
451451
output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutAlternateContactError::unhandled)?;
452452
output.build()
453453
};
454-
if (&tmp.message).is_none() {
454+
if tmp.message.is_none() {
455455
tmp.message = _error_message;
456456
}
457457
tmp
@@ -503,7 +503,7 @@ pub fn parse_put_contact_information_error(
503503
output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutContactInformationError::unhandled)?;
504504
output.build()
505505
};
506-
if (&tmp.message).is_none() {
506+
if tmp.message.is_none() {
507507
tmp.message = _error_message;
508508
}
509509
tmp
@@ -520,7 +520,7 @@ pub fn parse_put_contact_information_error(
520520
output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutContactInformationError::unhandled)?;
521521
output.build()
522522
};
523-
if (&tmp.message).is_none() {
523+
if tmp.message.is_none() {
524524
tmp.message = _error_message;
525525
}
526526
tmp
@@ -537,7 +537,7 @@ pub fn parse_put_contact_information_error(
537537
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)?;
538538
output.build()
539539
};
540-
if (&tmp.message).is_none() {
540+
if tmp.message.is_none() {
541541
tmp.message = _error_message;
542542
}
543543
tmp
@@ -554,7 +554,7 @@ pub fn parse_put_contact_information_error(
554554
output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::PutContactInformationError::unhandled)?;
555555
output.build()
556556
};
557-
if (&tmp.message).is_none() {
557+
if tmp.message.is_none() {
558558
tmp.message = _error_message;
559559
}
560560
tmp

sdk/acm/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#![allow(clippy::blacklisted_name)]
88
#![allow(clippy::vec_init_then_push)]
99
#![allow(clippy::type_complexity)]
10+
#![allow(clippy::needless_return)]
1011
#![allow(rustdoc::bare_urls)]
1112
#![warn(missing_docs)]
1213
//! <fullname>Certificate Manager</fullname>

0 commit comments

Comments
 (0)