Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into feature/otel-span-k…
Browse files Browse the repository at this point in the history
…ind-support

Merge upstream main to resolve failing checks
  • Loading branch information
alessandrobologna committed Dec 9, 2024
2 parents 534b248 + f024fd0 commit 0e48a80
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 21 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ on:
push:
paths:
- "lambda-events/**"
- "Cargo.toml"
pull_request:
paths:
- "lambda-events/**"
- "Cargo.toml"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- "1.70.0" # Current MSRV
- "1.71.1" # Current MSRV
- stable
env:
RUST_BACKTRACE: 1
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ on:
paths:
- 'lambda-runtime-api-client/**'
- 'lambda-extension/**'
- 'lambda-runtime/**'
- 'Cargo.toml'

pull_request:
paths:
- 'lambda-runtime-api-client/**'
- 'lambda-extension/**'
- 'lambda-runtime/**'
- 'Cargo.toml'


jobs:
Expand All @@ -18,7 +22,7 @@ jobs:
strategy:
matrix:
toolchain:
- "1.70.0" # Current MSRV
- "1.71.1" # Current MSRV
- stable
env:
RUST_BACKTRACE: 1
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@ on:
- 'lambda-runtime-api-client/**'
- 'lambda-runtime/**'
- 'lambda-http/**'
- 'Cargo.toml'

pull_request:
paths:
- 'lambda-runtime-api-client/**'
- 'lambda-runtime/**'
- 'lambda-http/**'
- 'Cargo.toml'

jobs:
build-runtime:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- "1.70.0" # Current MSRV
- "1.71.1" # Current MSRV
- stable
env:
RUST_BACKTRACE: 1
Expand Down
2 changes: 1 addition & 1 deletion lambda-events/src/custom_serde/codebuild_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::fmt;
const CODEBUILD_TIME_FORMAT: &str = "%b %e, %Y %l:%M:%S %p";

struct TimeVisitor;
impl<'de> Visitor<'de> for TimeVisitor {
impl Visitor<'_> for TimeVisitor {
type Value = DateTime<Utc>;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion lambda-events/src/custom_serde/float_unix_epoch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ where
d.deserialize_f64(SecondsFloatTimestampVisitor)
}

impl<'de> de::Visitor<'de> for SecondsFloatTimestampVisitor {
impl de::Visitor<'_> for SecondsFloatTimestampVisitor {
type Value = DateTime<Utc>;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion lambda-events/src/custom_serde/http_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub fn serialize<S: Serializer>(method: &Method, ser: S) -> Result<S::Ok, S::Err
}

struct MethodVisitor;
impl<'de> Visitor<'de> for MethodVisitor {
impl Visitor<'_> for MethodVisitor {
type Value = Method;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion lambda-events/src/encodings/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ impl<'de> Deserialize<'de> for Body {
{
struct BodyVisitor;

impl<'de> Visitor<'de> for BodyVisitor {
impl Visitor<'_> for BodyVisitor {
type Value = Body;

fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion lambda-events/src/event/cloudwatch_alarms/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl Serialize for CloudWatchAlarmStateReasonData {

struct ReasonDataVisitor;

impl<'de> Visitor<'de> for ReasonDataVisitor {
impl Visitor<'_> for ReasonDataVisitor {
type Value = CloudWatchAlarmStateReasonData;

fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
Expand Down
1 change: 0 additions & 1 deletion lambda-events/src/event/documentdb/events/insert_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use super::commom_types::{AnyDocument, DatabaseCollection, DocumentId, DocumentK

#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]

pub struct ChangeInsertEvent {
#[serde(rename = "_id")]
id: DocumentId,
Expand Down
1 change: 0 additions & 1 deletion lambda-events/src/event/s3/object_lambda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ pub struct UserRequest {
/// `UserIdentity` contains details about the identity that made the call to S3 Object Lambda
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]

pub struct UserIdentity {
pub r#type: String,
pub principal_id: String,
Expand Down
6 changes: 3 additions & 3 deletions lambda-extension/src/extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub struct Extension<'a, E, L, T> {
telemetry_port_number: u16,
}

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

impl<'a> Default
for Extension<'a, Identity<LambdaEvent>, MakeIdentity<Vec<LambdaLog>>, MakeIdentity<Vec<LambdaTelemetry>>>
impl Default
for Extension<'_, Identity<LambdaEvent>, MakeIdentity<Vec<LambdaLog>>, MakeIdentity<Vec<LambdaTelemetry>>>
{
fn default() -> Self {
Self::new()
Expand Down
2 changes: 1 addition & 1 deletion lambda-http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub enum TransformResponse<'a, R, E> {
Response(RequestOrigin, ResponseFuture),
}

impl<'a, R, E> Future for TransformResponse<'a, R, E>
impl<R, E> Future for TransformResponse<'_, R, E>
where
R: IntoResponse,
{
Expand Down
6 changes: 3 additions & 3 deletions lambda-runtime/src/layers/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub struct CatchPanicService<'a, S> {
_phantom: PhantomData<&'a ()>,
}

impl<'a, S> CatchPanicService<'a, S> {
impl<S> CatchPanicService<'_, S> {
pub fn new(inner: S) -> Self {
Self {
inner,
Expand Down Expand Up @@ -66,7 +66,7 @@ pub enum CatchPanicFuture<'a, F> {
Error(Box<dyn Any + Send + 'static>),
}

impl<'a, F, T, E> Future for CatchPanicFuture<'a, F>
impl<F, T, E> Future for CatchPanicFuture<'_, F>
where
F: Future<Output = Result<T, E>>,
E: Into<Diagnostic> + Debug,
Expand Down Expand Up @@ -95,7 +95,7 @@ where
}
}

impl<'a, F> CatchPanicFuture<'a, F> {
impl<F> CatchPanicFuture<'_, F> {
fn build_panic_diagnostic(err: &Box<dyn Any + Send>) -> Diagnostic {
let error_message = if let Some(msg) = err.downcast_ref::<&str>() {
format!("Lambda panicked: {msg}")
Expand Down
4 changes: 2 additions & 2 deletions lambda-runtime/src/requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ where
}
}

impl<'a, R, B, S, D, E> IntoRequest for EventCompletionRequest<'a, R, B, S, D, E>
impl<R, B, S, D, E> IntoRequest for EventCompletionRequest<'_, R, B, S, D, E>
where
R: IntoFunctionResponse<B, S>,
B: Serialize,
Expand Down Expand Up @@ -170,7 +170,7 @@ impl<'a> EventErrorRequest<'a> {
}
}

impl<'a> IntoRequest for EventErrorRequest<'a> {
impl IntoRequest for EventErrorRequest<'_> {
fn into_req(self) -> Result<Request<Body>, Error> {
let uri = format!("/2018-06-01/runtime/invocation/{}/error", self.request_id);
let uri = Uri::from_str(&uri)?;
Expand Down
4 changes: 2 additions & 2 deletions lambda-runtime/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ pub struct Runtime<S> {
client: Arc<ApiClient>,
}

impl<'a, F, EventPayload, Response, BufferedResponse, StreamingResponse, StreamItem, StreamError>
impl<F, EventPayload, Response, BufferedResponse, StreamingResponse, StreamItem, StreamError>
Runtime<
RuntimeApiClientService<
RuntimeApiResponseService<
CatchPanicService<'a, F>,
CatchPanicService<'_, F>,
EventPayload,
Response,
BufferedResponse,
Expand Down

0 comments on commit 0e48a80

Please sign in to comment.