Qualm various emerging unused warnings.

This commit is contained in:
Sergio Benitez 2023-11-01 01:16:28 -05:00
parent fbd1a0d069
commit 48d1b82e84
6 changed files with 7 additions and 4 deletions

View File

@ -225,6 +225,7 @@ fn internal_uri_macro_decl(route: &Route) -> TokenStream {
}
#[doc(hidden)]
#[allow(unused)]
pub use #inner_macro_name as #macro_name;
}
}

View File

@ -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::*;
}

View File

@ -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]

View File

@ -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};

View File

@ -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,
}

View File

@ -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()
});