Skip to content

Commit bb24199

Browse files
authored
Update Rust edition to 2021 (#501)
The AWS SDK already made the upgrade to 2021. We've had the `warn_2018_idioms` lint flag enabled for a while. Since we're making a breaking change in the next version of lambda_http, I thought it could be a good opportunity to get this in, and bump the version to all the crates at the same time. Signed-off-by: David Calavera <[email protected]>
1 parent dcebdf0 commit bb24199

File tree

7 files changed

+8
-26
lines changed

7 files changed

+8
-26
lines changed

.github/workflows/build.yml

+1-19
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- ubuntu-latest
1313
- macOS-latest
1414
rust:
15-
- "1.54.0" # Current MSRV
15+
- "1.58.0" # Current MSRV
1616
- stable
1717
- beta
1818
- nightly
@@ -22,24 +22,6 @@ jobs:
2222
include:
2323
- rust: nightly
2424
allow_failure: true
25-
# exclude:
26-
# - os: macOS-latest
27-
# target: x86_64-unknown-linux-musl
28-
# - os: ubuntu-latest
29-
# rust: 1.40.0
30-
# target: x86_64-unknown-linux-musl
31-
# - os: ubuntu-latest
32-
# rust: beta
33-
# target: x86_64-unknown-linux-musl
34-
# - os: ubuntu-latest
35-
# rust: nightly
36-
# target: x86_64-unknown-linux-musl
37-
# - os: macOS-latest
38-
# rust: 1.40.0
39-
# - os: macOS-latest
40-
# rust: beta
41-
# - os: macOS-latest
42-
# rust: nightly
4325
env:
4426
RUST_BACKTRACE: 1
4527
steps:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ This will make your function compile much faster.
398398

399399
## Supported Rust Versions (MSRV)
400400

401-
The AWS Lambda Rust Runtime requires a minimum of Rust 1.54, and is not guaranteed to build on compiler versions earlier than that.
401+
The AWS Lambda Rust Runtime requires a minimum of Rust 1.58, and is not guaranteed to build on compiler versions earlier than that.
402402

403403
## Security
404404

lambda-extension/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "lambda-extension"
33
version = "0.5.0"
4-
edition = "2018"
4+
edition = "2021"
55
authors = ["David Calavera <[email protected]>"]
66
description = "AWS Lambda Extension API"
77
license = "Apache-2.0"

lambda-http/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "lambda_http"
33
version = "0.5.2"
44
authors = ["Doug Tangren"]
5-
edition = "2018"
5+
edition = "2021"
66
description = "Application Load Balancer and API Gateway event types for AWS Lambda"
77
keywords = ["AWS", "Lambda", "APIGateway", "ALB", "API"]
88
license = "Apache-2.0"

lambda-http/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![warn(missing_docs)]
1+
#![warn(missing_docs, rust_2018_idioms)]
22
//#![deny(warnings)]
33
//! Enriches the `lambda` crate with [`http`](https://github.com/hyperium/http)
44
//! types targeting AWS [ALB](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html), [API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html) REST and HTTP API lambda integrations.
@@ -104,7 +104,7 @@ where
104104
{
105105
type Output = Result<LambdaResponse, E>;
106106

107-
fn poll(mut self: Pin<&mut Self>, cx: &mut TaskContext) -> Poll<Self::Output> {
107+
fn poll(mut self: Pin<&mut Self>, cx: &mut TaskContext<'_>) -> Poll<Self::Output> {
108108
match *self {
109109
TransformResponse::Request(ref mut origin, ref mut request) => match request.as_mut().poll(cx) {
110110
Poll::Ready(Ok(resp)) => {

lambda-runtime-api-client/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "lambda_runtime_api_client"
33
version = "0.5.0"
4-
edition = "2018"
4+
edition = "2021"
55
authors = ["David Calavera <[email protected]>"]
66
description = "AWS Lambda Runtime interaction API"
77
license = "Apache-2.0"

lambda-runtime/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "lambda_runtime"
33
version = "0.5.1"
44
authors = ["David Barsky <[email protected]>"]
55
description = "AWS Lambda Runtime"
6-
edition = "2018"
6+
edition = "2021"
77
license = "Apache-2.0"
88
repository = "https://github.com/awslabs/aws-lambda-rust-runtime"
99
categories = ["web-programming::http-server"]

0 commit comments

Comments
 (0)