mirror of https://github.com/rwf2/Rocket.git
Silence false positive warnings.
Use `allow(deadcode)` on structs that exist solely to be debug-printed.
This commit is contained in:
parent
f7e703bc5e
commit
a34edc4de9
|
@ -8,6 +8,7 @@ use rocket::serde::Deserialize;
|
|||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(crate = "rocket::serde")]
|
||||
#[allow(dead_code)]
|
||||
struct AppConfig {
|
||||
key: String,
|
||||
port: u16
|
||||
|
|
|
@ -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>,
|
||||
|
|
Loading…
Reference in New Issue