From 566dd5d9abf77d8fa1f1cb25195f7bffccb9af38 Mon Sep 17 00:00:00 2001 From: Daniel Cormier Date: Fri, 7 Oct 2022 17:22:28 -0400 Subject: [PATCH] Reexport external modules of publicly used types --- lambda-http/src/lib.rs | 6 ++++++ lambda-http/src/response.rs | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lambda-http/src/lib.rs b/lambda-http/src/lib.rs index d8d1e942..ff0fa60a 100644 --- a/lambda-http/src/lib.rs +++ b/lambda-http/src/lib.rs @@ -78,6 +78,12 @@ use crate::{ request::{LambdaRequest, RequestOrigin}, response::LambdaResponse, }; + +#[cfg(feature = "alb")] +pub use aws_lambda_events::alb; +#[cfg(any(feature = "apigw_rest", feature = "apigw_http", feature = "apigw_websockets"))] +pub use aws_lambda_events::apigw; + pub use aws_lambda_events::encodings::Body; use std::{ future::Future, diff --git a/lambda-http/src/response.rs b/lambda-http/src/response.rs index 556106d3..03d52380 100644 --- a/lambda-http/src/response.rs +++ b/lambda-http/src/response.rs @@ -1,13 +1,13 @@ //! Response types use crate::request::RequestOrigin; -use aws_lambda_events::encodings::Body; #[cfg(feature = "alb")] -use aws_lambda_events::event::alb::AlbTargetGroupResponse; +use aws_lambda_events::alb::AlbTargetGroupResponse; #[cfg(any(feature = "apigw_rest", feature = "apigw_websockets"))] -use aws_lambda_events::event::apigw::ApiGatewayProxyResponse; +use aws_lambda_events::apigw::ApiGatewayProxyResponse; #[cfg(feature = "apigw_http")] -use aws_lambda_events::event::apigw::ApiGatewayV2httpResponse; +use aws_lambda_events::apigw::ApiGatewayV2httpResponse; +use aws_lambda_events::encodings::Body; use encoding_rs::Encoding; use http::header::CONTENT_ENCODING; use http::HeaderMap;