From 48d1b82e840348842cc0d089428a02ba9b982bef Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Wed, 1 Nov 2023 01:16:28 -0500 Subject: [PATCH] Qualm various emerging unused warnings. --- core/codegen/src/attribute/route/mod.rs | 1 + core/http/src/tls/mtls.rs | 1 - examples/cookies/src/message.rs | 2 +- examples/cookies/src/session.rs | 2 +- examples/forms/src/main.rs | 2 ++ examples/upgrade/src/main.rs | 3 ++- 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/codegen/src/attribute/route/mod.rs b/core/codegen/src/attribute/route/mod.rs index c2e3043a..3b72f470 100644 --- a/core/codegen/src/attribute/route/mod.rs +++ b/core/codegen/src/attribute/route/mod.rs @@ -225,6 +225,7 @@ fn internal_uri_macro_decl(route: &Route) -> TokenStream { } #[doc(hidden)] + #[allow(unused)] pub use #inner_macro_name as #macro_name; } } diff --git a/core/http/src/tls/mtls.rs b/core/http/src/tls/mtls.rs index 45ea38fc..7a7cd169 100644 --- a/core/http/src/tls/mtls.rs +++ b/core/http/src/tls/mtls.rs @@ -4,7 +4,6 @@ pub mod oid { //! [`der-parser`](https://docs.rs/der-parser/7). pub use x509_parser::oid_registry::*; - pub use x509_parser::der_parser::oid::*; pub use x509_parser::objects::*; } diff --git a/examples/cookies/src/message.rs b/examples/cookies/src/message.rs index d4896adb..06a33a00 100644 --- a/examples/cookies/src/message.rs +++ b/examples/cookies/src/message.rs @@ -1,6 +1,6 @@ use rocket::form::Form; use rocket::response::Redirect; -use rocket::http::{Cookie, CookieJar}; +use rocket::http::CookieJar; use rocket_dyn_templates::{Template, context}; #[macro_export] diff --git a/examples/cookies/src/session.rs b/examples/cookies/src/session.rs index d66a5911..11bf55d1 100644 --- a/examples/cookies/src/session.rs +++ b/examples/cookies/src/session.rs @@ -1,7 +1,7 @@ use rocket::outcome::IntoOutcome; use rocket::request::{self, FlashMessage, FromRequest, Request}; use rocket::response::{Redirect, Flash}; -use rocket::http::{Cookie, CookieJar, Status}; +use rocket::http::{CookieJar, Status}; use rocket::form::Form; use rocket_dyn_templates::{Template, context}; diff --git a/examples/forms/src/main.rs b/examples/forms/src/main.rs index 97c13e72..a908eb47 100644 --- a/examples/forms/src/main.rs +++ b/examples/forms/src/main.rs @@ -11,7 +11,9 @@ use rocket_dyn_templates::Template; struct Password<'v> { #[field(validate = len(6..))] #[field(validate = eq(self.second))] + #[allow(unused)] first: &'v str, + #[allow(unused)] #[field(validate = eq(self.first))] second: &'v str, } diff --git a/examples/upgrade/src/main.rs b/examples/upgrade/src/main.rs index 943ff070..7526b5b1 100644 --- a/examples/upgrade/src/main.rs +++ b/examples/upgrade/src/main.rs @@ -16,7 +16,8 @@ fn echo_stream(ws: ws::WebSocket) -> ws::Stream!['static] { fn echo_channel(ws: ws::WebSocket) -> ws::Channel<'static> { // This is entirely optional. Change default configuration. let ws = ws.config(ws::Config { - max_send_queue: Some(5), + // set max message size to 3MiB + max_message_size: Some(3 << 20), ..Default::default() });