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)]
#[serde(crate = "rocket::serde")]
#[allow(dead_code)]
struct AppConfig {
key: String,
port: u16

View File

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