Skip to content

Commit 58592a7

Browse files
committed
chore: fmt
1 parent 7b16e2a commit 58592a7

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

lambda-runtime/src/layers/api_response.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
use crate::{
2-
Diagnostic, EventErrorRequest, IntoFunctionResponse, LambdaEvent, constants::LAMBDA_RUNTIME_INVOCATION_ID, deserializer, rate_limiter::RateLimiter, requests::{EventCompletionRequest, IntoRequest}, runtime::LambdaInvocation,
2+
constants::LAMBDA_RUNTIME_INVOCATION_ID,
3+
deserializer,
4+
rate_limiter::RateLimiter,
5+
requests::{EventCompletionRequest, IntoRequest},
6+
runtime::LambdaInvocation,
7+
Diagnostic, EventErrorRequest, IntoFunctionResponse, LambdaEvent,
38
};
49
use futures::{ready, Stream};
510
use lambda_runtime_api_client::{body::Body, BoxError};
@@ -9,7 +14,6 @@ use std::{fmt::Debug, future::Future, marker::PhantomData, pin::Pin, task, time:
914
use tower::Service;
1015
use tracing::{error, trace, warn};
1116

12-
1317
static MALFORMED_INVOCATION_ID_LIMITER: RateLimiter = RateLimiter::new(Duration::from_secs(60));
1418

1519
/// Tower service that turns the result or an error of a handler function into a Lambda Runtime API
@@ -132,7 +136,6 @@ where
132136
Some(value) => match value.to_str() {
133137
Ok(value) => Some(value.to_owned()),
134138
Err(error) => {
135-
136139
if MALFORMED_INVOCATION_ID_LIMITER.allow() {
137140
warn!(
138141
error = ?error,

lambda-runtime/src/rate_limiter.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ impl RateLimiter {
6666
#[cfg(test)]
6767
mod tests {
6868
use super::*;
69-
use std::panic::{catch_unwind, AssertUnwindSafe};
70-
use std::thread;
69+
use std::{
70+
panic::{catch_unwind, AssertUnwindSafe},
71+
thread,
72+
};
7173

7274
#[test]
7375
fn allows_first_call() {

0 commit comments

Comments
 (0)