From b7adf03dcc4ad5e1ae10e569585a93c63edbb759 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sun, 21 Jul 2024 18:23:08 +0200 Subject: [PATCH] Decrease visibility of NewItem(Class)Form* --- src/frontend/item/add.rs | 28 ++++++++++++++-------------- src/frontend/item_class/add.rs | 16 ++++++++-------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/frontend/item/add.rs b/src/frontend/item/add.rs index d4bf204..d1d035c 100644 --- a/src/frontend/item/add.rs +++ b/src/frontend/item/add.rs @@ -24,24 +24,24 @@ fn default_quantity() -> usize { } #[derive(Debug, Deserialize)] -pub struct NewItemForm { +struct NewItemForm { #[serde(default = "default_quantity")] - pub quantity: usize, - pub name: Option, - pub parent: Option, - pub class: Uuid, - pub original_packaging: Option, - pub description: String, + quantity: usize, + name: Option, + parent: Option, + class: Uuid, + original_packaging: Option, + description: String, } #[derive(Debug, Deserialize)] -pub struct NewItemFormPrefilled { - pub quantity: Option, - pub name: Option, - pub parent: Option, - pub class: Option, - pub original_packaging: Option, - pub description: Option, +struct NewItemFormPrefilled { + quantity: Option, + name: Option, + parent: Option, + class: Option, + original_packaging: Option, + description: Option, } #[get("/items/add")] diff --git a/src/frontend/item_class/add.rs b/src/frontend/item_class/add.rs index 75d56ad..1e6860c 100644 --- a/src/frontend/item_class/add.rs +++ b/src/frontend/item_class/add.rs @@ -20,17 +20,17 @@ pub fn config(cfg: &mut web::ServiceConfig) { } #[derive(Debug, Deserialize)] -pub struct NewItemClassForm { - pub name: String, - pub parent: Option, - pub description: String, +struct NewItemClassForm { + name: String, + parent: Option, + description: String, } #[derive(Debug, Deserialize)] -pub struct NewItemClassFormPrefilled { - pub name: Option, - pub parent: Option, - pub description: Option, +struct NewItemClassFormPrefilled { + name: Option, + parent: Option, + description: Option, } #[get("/item-classes/add")]