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)]
|
#[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
|
||||||
|
|
|
@ -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>,
|
||||||
|
|
Loading…
Reference in New Issue