Skip to content

Commit 19e6881

Browse files
committed
Removed + Sync, added Ser to Context.
1 parent 17c2a29 commit 19e6881

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lambda/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ use types::Diagnostic;
7171
pub(crate) type Error = Box<dyn std::error::Error + Send + Sync + 'static>;
7272

7373
/// Configuration derived from environment variables.
74-
#[derive(Debug, Default, Clone, PartialEq)]
74+
#[derive(Debug, Default, Clone, PartialEq, Serialize)]
7575
pub struct Config {
7676
/// The host and port of the [runtime API](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html).
7777
pub endpoint: String,
@@ -130,7 +130,7 @@ pub struct HandlerFn<F> {
130130
impl<F, A, B, Error, Fut> Handler<A, B> for HandlerFn<F>
131131
where
132132
F: Fn(A, Context) -> Fut,
133-
Fut: Future<Output = Result<B, Error>> + Send + Sync,
133+
Fut: Future<Output = Result<B, Error>> + Send ,
134134
Error: Into<Box<dyn std::error::Error + Send + Sync + 'static>> + fmt::Display,
135135
{
136136
type Error = Error;
@@ -173,7 +173,7 @@ where
173173
) -> Result<(), Error>
174174
where
175175
F: Handler<A, B> + Send + Sync + 'static,
176-
<F as Handler<A, B>>::Fut: Future<Output = Result<B, <F as Handler<A, B>>::Error>> + Send + Sync + 'static,
176+
<F as Handler<A, B>>::Fut: Future<Output = Result<B, <F as Handler<A, B>>::Error>> + Send + 'static,
177177
<F as Handler<A, B>>::Error: fmt::Display + Send + Sync + 'static,
178178
A: for<'de> Deserialize<'de> + Send + Sync + 'static,
179179
B: Serialize + Send + Sync + 'static,
@@ -328,7 +328,7 @@ where
328328
pub async fn run<A, B, F>(handler: F) -> Result<(), Error>
329329
where
330330
F: Handler<A, B> + Send + Sync + 'static,
331-
<F as Handler<A, B>>::Fut: Future<Output = Result<B, <F as Handler<A, B>>::Error>> + Send + Sync + 'static,
331+
<F as Handler<A, B>>::Fut: Future<Output = Result<B, <F as Handler<A, B>>::Error>> + Send + 'static,
332332
<F as Handler<A, B>>::Error: fmt::Display + Send + Sync + 'static,
333333
A: for<'de> Deserialize<'de> + Send + Sync + 'static,
334334
B: Serialize + Send + Sync + 'static,

lambda/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pub struct CognitoIdentity {
9393
/// are populated using the [Lambda environment variables](https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html)
9494
/// and the headers returned by the poll request to the Runtime APIs.
9595
#[non_exhaustive]
96-
#[derive(Clone, Debug, PartialEq, Default)]
96+
#[derive(Clone, Debug, PartialEq, Default, Serialize)]
9797
pub struct Context {
9898
/// The AWS request ID generated by the Lambda service.
9999
pub request_id: String,

0 commit comments

Comments
 (0)