11use std:: { error:: Error , marker:: PhantomData , result} ;
22
3+ use lambda_runtime_client:: RuntimeClient ;
34use serde;
45use serde_json;
5-
6- use context:: Context ;
7- use env:: { ConfigProvider , EnvConfigProvider , FunctionSettings } ;
8- use error:: { HandlerError , RuntimeError } ;
9- use lambda_runtime_client:: RuntimeClient ;
106use tokio:: runtime:: Runtime as TokioRuntime ;
117
8+ use crate :: context:: Context ;
9+ use crate :: env:: { ConfigProvider , EnvConfigProvider , FunctionSettings } ;
10+ use crate :: error:: { HandlerError , RuntimeError } ;
11+
1212const MAX_RETRIES : i8 = 3 ;
1313
1414/// Functions acting as a handler must conform to this type.
@@ -301,7 +301,7 @@ where
301301
302302 ( ev, handler_ctx)
303303 }
304- Err ( mut e) => {
304+ Err ( e) => {
305305 error ! ( "Could not parse event to type: {}" , e) ;
306306 let mut runtime_err = RuntimeError :: from ( e) ;
307307 runtime_err. request_id = Option :: from ( invocation_ctx. aws_request_id ) ;
@@ -317,13 +317,13 @@ where
317317#[ cfg( test) ]
318318pub ( crate ) mod tests {
319319 use super :: * ;
320- use context;
321- use env;
320+ use crate :: context;
321+ use crate :: env;
322322 use lambda_runtime_client:: RuntimeClient ;
323323
324324 #[ test]
325325 fn runtime_invokes_handler ( ) {
326- let config: & env:: ConfigProvider = & env:: tests:: MockConfigProvider { error : false } ;
326+ let config: & dyn env:: ConfigProvider = & env:: tests:: MockConfigProvider { error : false } ;
327327 let client = RuntimeClient :: new (
328328 config
329329 . get_runtime_api_endpoint ( )
0 commit comments