Silence false positive warnings.

Use `allow(deadcode)` on structs that exist solely to be debug-printed.
This commit is contained in:
Sergio Benitez 2022-08-04 17:45:53 -07:00
parent f7e703bc5e
commit a34edc4de9
2 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,7 @@ use rocket::serde::Deserialize;
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
#[serde(crate = "rocket::serde")] #[serde(crate = "rocket::serde")]
#[allow(dead_code)]
struct AppConfig { struct AppConfig {
key: String, key: String,
port: u16 port: u16

View File

@ -33,6 +33,7 @@ enum Category {
} }
#[derive(Debug, FromForm)] #[derive(Debug, FromForm)]
#[allow(dead_code)]
struct Submission<'v> { struct Submission<'v> {
#[field(validate = len(1..))] #[field(validate = len(1..))]
title: &'v str, title: &'v str,
@ -48,6 +49,7 @@ struct Submission<'v> {
} }
#[derive(Debug, FromForm)] #[derive(Debug, FromForm)]
#[allow(dead_code)]
struct Account<'v> { struct Account<'v> {
#[field(validate = len(1..))] #[field(validate = len(1..))]
name: &'v str, name: &'v str,
@ -57,6 +59,7 @@ struct Account<'v> {
} }
#[derive(Debug, FromForm)] #[derive(Debug, FromForm)]
#[allow(dead_code)]
struct Submit<'v> { struct Submit<'v> {
account: Account<'v>, account: Account<'v>,
submission: Submission<'v>, submission: Submission<'v>,