Skip to content

Commit f024fd0

Browse files
authored
fix: clippy error + bump MSRV (#948)
* test-ci * fix: bump MSRV * fix: fix GitHub Actions trigger path * fix: clippy errors * fix: cleanup
1 parent a1f8c05 commit f024fd0

File tree

15 files changed

+27
-21
lines changed

15 files changed

+27
-21
lines changed

.github/workflows/build-events.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@ on:
44
push:
55
paths:
66
- "lambda-events/**"
7+
- "Cargo.toml"
78
pull_request:
89
paths:
910
- "lambda-events/**"
11+
- "Cargo.toml"
1012

1113
jobs:
1214
build:
1315
runs-on: ubuntu-latest
1416
strategy:
1517
matrix:
1618
toolchain:
17-
- "1.70.0" # Current MSRV
19+
- "1.71.1" # Current MSRV
1820
- stable
1921
env:
2022
RUST_BACKTRACE: 1

.github/workflows/build-extension.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ on:
55
paths:
66
- 'lambda-runtime-api-client/**'
77
- 'lambda-extension/**'
8+
- 'lambda-runtime/**'
9+
- 'Cargo.toml'
810

911
pull_request:
1012
paths:
1113
- 'lambda-runtime-api-client/**'
1214
- 'lambda-extension/**'
15+
- 'lambda-runtime/**'
16+
- 'Cargo.toml'
1317

1418

1519
jobs:
@@ -18,7 +22,7 @@ jobs:
1822
strategy:
1923
matrix:
2024
toolchain:
21-
- "1.70.0" # Current MSRV
25+
- "1.71.1" # Current MSRV
2226
- stable
2327
env:
2428
RUST_BACKTRACE: 1

.github/workflows/build-runtime.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,22 @@ on:
66
- 'lambda-runtime-api-client/**'
77
- 'lambda-runtime/**'
88
- 'lambda-http/**'
9+
- 'Cargo.toml'
910

1011
pull_request:
1112
paths:
1213
- 'lambda-runtime-api-client/**'
1314
- 'lambda-runtime/**'
1415
- 'lambda-http/**'
16+
- 'Cargo.toml'
1517

1618
jobs:
1719
build-runtime:
1820
runs-on: ubuntu-latest
1921
strategy:
2022
matrix:
2123
toolchain:
22-
- "1.70.0" # Current MSRV
24+
- "1.71.1" # Current MSRV
2325
- stable
2426
env:
2527
RUST_BACKTRACE: 1

lambda-events/src/custom_serde/codebuild_time.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::fmt;
1010
const CODEBUILD_TIME_FORMAT: &str = "%b %e, %Y %l:%M:%S %p";
1111

1212
struct TimeVisitor;
13-
impl<'de> Visitor<'de> for TimeVisitor {
13+
impl Visitor<'_> for TimeVisitor {
1414
type Value = DateTime<Utc>;
1515

1616
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {

lambda-events/src/custom_serde/float_unix_epoch.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ where
7373
d.deserialize_f64(SecondsFloatTimestampVisitor)
7474
}
7575

76-
impl<'de> de::Visitor<'de> for SecondsFloatTimestampVisitor {
76+
impl de::Visitor<'_> for SecondsFloatTimestampVisitor {
7777
type Value = DateTime<Utc>;
7878

7979
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {

lambda-events/src/custom_serde/http_method.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub fn serialize<S: Serializer>(method: &Method, ser: S) -> Result<S::Ok, S::Err
1010
}
1111

1212
struct MethodVisitor;
13-
impl<'de> Visitor<'de> for MethodVisitor {
13+
impl Visitor<'_> for MethodVisitor {
1414
type Value = Method;
1515

1616
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {

lambda-events/src/encodings/http.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ impl<'de> Deserialize<'de> for Body {
197197
{
198198
struct BodyVisitor;
199199

200-
impl<'de> Visitor<'de> for BodyVisitor {
200+
impl Visitor<'_> for BodyVisitor {
201201
type Value = Body;
202202

203203
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {

lambda-events/src/event/cloudwatch_alarms/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ impl Serialize for CloudWatchAlarmStateReasonData {
232232

233233
struct ReasonDataVisitor;
234234

235-
impl<'de> Visitor<'de> for ReasonDataVisitor {
235+
impl Visitor<'_> for ReasonDataVisitor {
236236
type Value = CloudWatchAlarmStateReasonData;
237237

238238
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {

lambda-events/src/event/documentdb/events/insert_event.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use super::commom_types::{AnyDocument, DatabaseCollection, DocumentId, DocumentK
44

55
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
66
#[serde(rename_all = "camelCase")]
7-
87
pub struct ChangeInsertEvent {
98
#[serde(rename = "_id")]
109
id: DocumentId,

lambda-events/src/event/s3/object_lambda.rs

-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ pub struct UserRequest {
8787
/// `UserIdentity` contains details about the identity that made the call to S3 Object Lambda
8888
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
8989
#[serde(rename_all = "camelCase")]
90-
9190
pub struct UserIdentity {
9291
pub r#type: String,
9392
pub principal_id: String,

lambda-extension/src/extension.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub struct Extension<'a, E, L, T> {
4343
telemetry_port_number: u16,
4444
}
4545

46-
impl<'a> Extension<'a, Identity<LambdaEvent>, MakeIdentity<Vec<LambdaLog>>, MakeIdentity<Vec<LambdaTelemetry>>> {
46+
impl Extension<'_, Identity<LambdaEvent>, MakeIdentity<Vec<LambdaLog>>, MakeIdentity<Vec<LambdaTelemetry>>> {
4747
/// Create a new base [`Extension`] with a no-op events processor
4848
pub fn new() -> Self {
4949
Extension {
@@ -62,8 +62,8 @@ impl<'a> Extension<'a, Identity<LambdaEvent>, MakeIdentity<Vec<LambdaLog>>, Make
6262
}
6363
}
6464

65-
impl<'a> Default
66-
for Extension<'a, Identity<LambdaEvent>, MakeIdentity<Vec<LambdaLog>>, MakeIdentity<Vec<LambdaTelemetry>>>
65+
impl Default
66+
for Extension<'_, Identity<LambdaEvent>, MakeIdentity<Vec<LambdaLog>>, MakeIdentity<Vec<LambdaTelemetry>>>
6767
{
6868
fn default() -> Self {
6969
Self::new()

lambda-http/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub enum TransformResponse<'a, R, E> {
114114
Response(RequestOrigin, ResponseFuture),
115115
}
116116

117-
impl<'a, R, E> Future for TransformResponse<'a, R, E>
117+
impl<R, E> Future for TransformResponse<'_, R, E>
118118
where
119119
R: IntoResponse,
120120
{

lambda-runtime/src/layers/panic.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub struct CatchPanicService<'a, S> {
1818
_phantom: PhantomData<&'a ()>,
1919
}
2020

21-
impl<'a, S> CatchPanicService<'a, S> {
21+
impl<S> CatchPanicService<'_, S> {
2222
pub fn new(inner: S) -> Self {
2323
Self {
2424
inner,
@@ -66,7 +66,7 @@ pub enum CatchPanicFuture<'a, F> {
6666
Error(Box<dyn Any + Send + 'static>),
6767
}
6868

69-
impl<'a, F, T, E> Future for CatchPanicFuture<'a, F>
69+
impl<F, T, E> Future for CatchPanicFuture<'_, F>
7070
where
7171
F: Future<Output = Result<T, E>>,
7272
E: Into<Diagnostic> + Debug,
@@ -95,7 +95,7 @@ where
9595
}
9696
}
9797

98-
impl<'a, F> CatchPanicFuture<'a, F> {
98+
impl<F> CatchPanicFuture<'_, F> {
9999
fn build_panic_diagnostic(err: &Box<dyn Any + Send>) -> Diagnostic {
100100
let error_message = if let Some(msg) = err.downcast_ref::<&str>() {
101101
format!("Lambda panicked: {msg}")

lambda-runtime/src/requests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ where
7272
}
7373
}
7474

75-
impl<'a, R, B, S, D, E> IntoRequest for EventCompletionRequest<'a, R, B, S, D, E>
75+
impl<R, B, S, D, E> IntoRequest for EventCompletionRequest<'_, R, B, S, D, E>
7676
where
7777
R: IntoFunctionResponse<B, S>,
7878
B: Serialize,
@@ -170,7 +170,7 @@ impl<'a> EventErrorRequest<'a> {
170170
}
171171
}
172172

173-
impl<'a> IntoRequest for EventErrorRequest<'a> {
173+
impl IntoRequest for EventErrorRequest<'_> {
174174
fn into_req(self) -> Result<Request<Body>, Error> {
175175
let uri = format!("/2018-06-01/runtime/invocation/{}/error", self.request_id);
176176
let uri = Uri::from_str(&uri)?;

lambda-runtime/src/runtime.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ pub struct Runtime<S> {
5555
client: Arc<ApiClient>,
5656
}
5757

58-
impl<'a, F, EventPayload, Response, BufferedResponse, StreamingResponse, StreamItem, StreamError>
58+
impl<F, EventPayload, Response, BufferedResponse, StreamingResponse, StreamItem, StreamError>
5959
Runtime<
6060
RuntimeApiClientService<
6161
RuntimeApiResponseService<
62-
CatchPanicService<'a, F>,
62+
CatchPanicService<'_, F>,
6363
EventPayload,
6464
Response,
6565
BufferedResponse,

0 commit comments

Comments
 (0)