Skip to content

Commit 4f15b63

Browse files
authored
Clippy warnings (#8)
* Updated header values for provided runtime and switched to ms time remaining * Fixed issue with deadline not being set in context and switched to realtime clock to get correct epoch * Removed libc dependency and switched to chrono for deadline calculation * Fixed docs example not to import HttpRuntimeClient * New error reporting method with correct content type and error type header. * Two fixes to honor max retries in the get_next_event method and call the error_reponse rather than init_fail when an error is thrown after the call to /next * Added homepage, docs, and repo to Cargo files * Added version of runtime client dependency * Passed environment config as reference and added fail on warnings
1 parent 9cd19e3 commit 4f15b63

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

lambda-runtime-client/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![warn(missing_docs)]
2+
#![deny(warnings)]
23
//! Rust client SDK for the AWS Lambda Runtime APIs. This crate defines
34
//! a `RuntimeClient` that encapsulates interactions with AWS Lambda's Runtime
45
//! APIs.

lambda-runtime/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![warn(missing_docs)]
2+
#![deny(warnings)]
23
//! Lambda runtime makes it easy to run Rust code inside AWS Lambda. To create
34
//! Lambda function with this library simply include it as a dependency, make
45
//! sure that you declare a function that respects the `Handler` type, and call

lambda-runtime/src/runtime.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ where
2727
for<'invocation> E: serde::Deserialize<'invocation>,
2828
O: serde::Serialize,
2929
{
30-
start_with_config(f, EnvConfigProvider::new(), runtime)
30+
start_with_config(f, &EnvConfigProvider::new(), runtime)
3131
}
3232

3333
#[macro_export]
@@ -53,7 +53,7 @@ macro_rules! lambda {
5353
/// The function panics if the `ConfigProvider` returns an error from the `get_runtime_api_endpoint()`
5454
/// or `get_function_settings()` methods. The panic forces AWS Lambda to terminate the environment
5555
/// and spin up a new one for the next invocation.
56-
pub(crate) fn start_with_config<E, O, C>(f: Handler<E, O>, config: C, runtime: Option<TokioRuntime>)
56+
pub(crate) fn start_with_config<E, O, C>(f: Handler<E, O>, config: &C, runtime: Option<TokioRuntime>)
5757
where
5858
for<'invocation> E: serde::Deserialize<'invocation>,
5959
O: serde::Serialize,

0 commit comments

Comments
 (0)