From ac291baaec7a6ea29774d04693cdfa57130ec3a1 Mon Sep 17 00:00:00 2001 From: David Pedersen Date: Thu, 7 Oct 2021 16:49:57 +0200 Subject: [PATCH] Fix dead code warnings (#373) --- examples/customize-extractor-error/src/main.rs | 1 + examples/error-handling-and-dependency-injection/src/main.rs | 1 + examples/form/src/main.rs | 1 + src/response/sse.rs | 1 - 4 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/customize-extractor-error/src/main.rs b/examples/customize-extractor-error/src/main.rs index 2a344306..87876f59 100644 --- a/examples/customize-extractor-error/src/main.rs +++ b/examples/customize-extractor-error/src/main.rs @@ -41,6 +41,7 @@ async fn handler(Json(user): Json) { } #[derive(Debug, Deserialize)] +#[allow(dead_code)] struct User { id: i64, username: String, diff --git a/examples/error-handling-and-dependency-injection/src/main.rs b/examples/error-handling-and-dependency-injection/src/main.rs index e15035ac..4654564b 100644 --- a/examples/error-handling-and-dependency-injection/src/main.rs +++ b/examples/error-handling-and-dependency-injection/src/main.rs @@ -147,6 +147,7 @@ struct User { } #[derive(Debug, Deserialize)] +#[allow(dead_code)] struct CreateUser { username: String, } diff --git a/examples/form/src/main.rs b/examples/form/src/main.rs index 3483a078..42b9643d 100644 --- a/examples/form/src/main.rs +++ b/examples/form/src/main.rs @@ -55,6 +55,7 @@ async fn show_form() -> Html<&'static str> { } #[derive(Deserialize, Debug)] +#[allow(dead_code)] struct Input { name: String, email: String, diff --git a/src/response/sse.rs b/src/response/sse.rs index c43332ed..3d8e5dff 100644 --- a/src/response/sse.rs +++ b/src/response/sse.rs @@ -168,7 +168,6 @@ where /// Server-sent event #[derive(Default, Debug)] pub struct Event { - name: Option, id: Option, data: Option, event: Option,