diff options
Diffstat (limited to 'crates/rocie-client/src/models')
54 files changed, 61 insertions, 147 deletions
diff --git a/crates/rocie-client/src/models/barcode.rs b/crates/rocie-client/src/models/barcode.rs index 17afbaf..b8d79d8 100644 --- a/crates/rocie-client/src/models/barcode.rs +++ b/crates/rocie-client/src/models/barcode.rs @@ -31,10 +31,6 @@ pub struct Barcode { impl Barcode { pub fn new(amount: models::UnitAmount, id: models::BarcodeId) -> Barcode { - Barcode { - amount, - id, - } + Barcode { amount, id } } } - diff --git a/crates/rocie-client/src/models/barcode_id.rs b/crates/rocie-client/src/models/barcode_id.rs index c3ebd4b..f1c507a 100644 --- a/crates/rocie-client/src/models/barcode_id.rs +++ b/crates/rocie-client/src/models/barcode_id.rs @@ -29,9 +29,6 @@ pub struct BarcodeId { impl BarcodeId { pub fn new(value: u32) -> BarcodeId { - BarcodeId { - value, - } + BarcodeId { value } } } - diff --git a/crates/rocie-client/src/models/content.rs b/crates/rocie-client/src/models/content.rs index 4b9572f..d9de75d 100644 --- a/crates/rocie-client/src/models/content.rs +++ b/crates/rocie-client/src/models/content.rs @@ -35,4 +35,3 @@ impl Default for Content { Self::ContentOneOf(Default::default()) } } - diff --git a/crates/rocie-client/src/models/content_one_of.rs b/crates/rocie-client/src/models/content_one_of.rs index fe28b38..31dcd9c 100644 --- a/crates/rocie-client/src/models/content_one_of.rs +++ b/crates/rocie-client/src/models/content_one_of.rs @@ -32,9 +32,6 @@ pub struct ContentOneOf { impl ContentOneOf { /// A step pub fn new(step: models::Step) -> ContentOneOf { - ContentOneOf { - step, - } + ContentOneOf { step } } } - diff --git a/crates/rocie-client/src/models/content_one_of_1.rs b/crates/rocie-client/src/models/content_one_of_1.rs index 07bf3a1..e490f06 100644 --- a/crates/rocie-client/src/models/content_one_of_1.rs +++ b/crates/rocie-client/src/models/content_one_of_1.rs @@ -32,9 +32,6 @@ pub struct ContentOneOf1 { impl ContentOneOf1 { /// A paragraph of just text, no instructions pub fn new(text: String) -> ContentOneOf1 { - ContentOneOf1 { - text, - } + ContentOneOf1 { text } } } - diff --git a/crates/rocie-client/src/models/cooklang_recipe.rs b/crates/rocie-client/src/models/cooklang_recipe.rs index f517566..5127ff1 100644 --- a/crates/rocie-client/src/models/cooklang_recipe.rs +++ b/crates/rocie-client/src/models/cooklang_recipe.rs @@ -43,7 +43,13 @@ pub struct CooklangRecipe { impl CooklangRecipe { /// A complete recipe The recipes do not have a name. You give it externally or maybe use some metadata key. The recipe returned from parsing is a [`ScalableRecipe`]. The difference between [`ScalableRecipe`] and [`ScaledRecipe`] is in the values of the quantities of ingredients, cookware and timers. The parser returns [`ScalableValue`]s and after scaling, these are converted to regular [`Value`]s. - pub fn new(cookware: Vec<models::Cookware>, ingredients: Vec<models::Ingredient>, metadata: models::Metadata, sections: Vec<models::Section>, timers: Vec<models::Timer>) -> CooklangRecipe { + pub fn new( + cookware: Vec<models::Cookware>, + ingredients: Vec<models::Ingredient>, + metadata: models::Metadata, + sections: Vec<models::Section>, + timers: Vec<models::Timer>, + ) -> CooklangRecipe { CooklangRecipe { cookware, ingredients, @@ -53,4 +59,3 @@ impl CooklangRecipe { } } } - diff --git a/crates/rocie-client/src/models/cookware.rs b/crates/rocie-client/src/models/cookware.rs index 4eb7856..d4ae55e 100644 --- a/crates/rocie-client/src/models/cookware.rs +++ b/crates/rocie-client/src/models/cookware.rs @@ -49,4 +49,3 @@ impl Cookware { } } } - diff --git a/crates/rocie-client/src/models/ingredient.rs b/crates/rocie-client/src/models/ingredient.rs index 8727335..5371298 100644 --- a/crates/rocie-client/src/models/ingredient.rs +++ b/crates/rocie-client/src/models/ingredient.rs @@ -36,4 +36,3 @@ impl Default for Ingredient { Self::IngredientOneOf(Default::default()) } } - diff --git a/crates/rocie-client/src/models/ingredient_one_of.rs b/crates/rocie-client/src/models/ingredient_one_of.rs index 7b649fa..732c390 100644 --- a/crates/rocie-client/src/models/ingredient_one_of.rs +++ b/crates/rocie-client/src/models/ingredient_one_of.rs @@ -31,9 +31,6 @@ pub struct IngredientOneOf { impl IngredientOneOf { /// This ingredient is a registered product. pub fn new(registered_product: models::IngredientOneOfRegisteredProduct) -> IngredientOneOf { - IngredientOneOf { - registered_product, - } + IngredientOneOf { registered_product } } } - diff --git a/crates/rocie-client/src/models/ingredient_one_of_1.rs b/crates/rocie-client/src/models/ingredient_one_of_1.rs index cf84019..8ed99db 100644 --- a/crates/rocie-client/src/models/ingredient_one_of_1.rs +++ b/crates/rocie-client/src/models/ingredient_one_of_1.rs @@ -30,10 +30,11 @@ pub struct IngredientOneOf1 { impl IngredientOneOf1 { /// This ingredient is a not yet registered product. - pub fn new(not_registered_product: models::IngredientOneOf1NotRegisteredProduct) -> IngredientOneOf1 { + pub fn new( + not_registered_product: models::IngredientOneOf1NotRegisteredProduct, + ) -> IngredientOneOf1 { IngredientOneOf1 { not_registered_product, } } } - diff --git a/crates/rocie-client/src/models/ingredient_one_of_1_not_registered_product.rs b/crates/rocie-client/src/models/ingredient_one_of_1_not_registered_product.rs index 65032c4..ce93005 100644 --- a/crates/rocie-client/src/models/ingredient_one_of_1_not_registered_product.rs +++ b/crates/rocie-client/src/models/ingredient_one_of_1_not_registered_product.rs @@ -40,4 +40,3 @@ impl IngredientOneOf1NotRegisteredProduct { } } } - diff --git a/crates/rocie-client/src/models/ingredient_one_of_2.rs b/crates/rocie-client/src/models/ingredient_one_of_2.rs index f83d3b5..12e270a 100644 --- a/crates/rocie-client/src/models/ingredient_one_of_2.rs +++ b/crates/rocie-client/src/models/ingredient_one_of_2.rs @@ -31,9 +31,6 @@ pub struct IngredientOneOf2 { impl IngredientOneOf2 { /// This ingredient is a reference to another recipe. pub fn new(recipe_reference: models::IngredientOneOf2RecipeReference) -> IngredientOneOf2 { - IngredientOneOf2 { - recipe_reference, - } + IngredientOneOf2 { recipe_reference } } } - diff --git a/crates/rocie-client/src/models/ingredient_one_of_2_recipe_reference.rs b/crates/rocie-client/src/models/ingredient_one_of_2_recipe_reference.rs index 9771484..c22d376 100644 --- a/crates/rocie-client/src/models/ingredient_one_of_2_recipe_reference.rs +++ b/crates/rocie-client/src/models/ingredient_one_of_2_recipe_reference.rs @@ -31,9 +31,6 @@ pub struct IngredientOneOf2RecipeReference { impl IngredientOneOf2RecipeReference { /// This ingredient is a reference to another recipe. pub fn new(id: models::RecipeId) -> IngredientOneOf2RecipeReference { - IngredientOneOf2RecipeReference { - id, - } + IngredientOneOf2RecipeReference { id } } } - diff --git a/crates/rocie-client/src/models/ingredient_one_of_registered_product.rs b/crates/rocie-client/src/models/ingredient_one_of_registered_product.rs index ea1a6b9..d7ab092 100644 --- a/crates/rocie-client/src/models/ingredient_one_of_registered_product.rs +++ b/crates/rocie-client/src/models/ingredient_one_of_registered_product.rs @@ -44,4 +44,3 @@ impl IngredientOneOfRegisteredProduct { } } } - diff --git a/crates/rocie-client/src/models/item.rs b/crates/rocie-client/src/models/item.rs index 87fe3f2..48a726d 100644 --- a/crates/rocie-client/src/models/item.rs +++ b/crates/rocie-client/src/models/item.rs @@ -38,4 +38,3 @@ impl Default for Item { Self::ItemOneOf(Default::default()) } } - diff --git a/crates/rocie-client/src/models/item_one_of.rs b/crates/rocie-client/src/models/item_one_of.rs index 98bb8a8..a802e4d 100644 --- a/crates/rocie-client/src/models/item_one_of.rs +++ b/crates/rocie-client/src/models/item_one_of.rs @@ -31,9 +31,6 @@ pub struct ItemOneOf { impl ItemOneOf { /// Just plain text pub fn new(text: models::ItemOneOfText) -> ItemOneOf { - ItemOneOf { - text, - } + ItemOneOf { text } } } - diff --git a/crates/rocie-client/src/models/item_one_of_1.rs b/crates/rocie-client/src/models/item_one_of_1.rs index 5e0fe37..f1d26f6 100644 --- a/crates/rocie-client/src/models/item_one_of_1.rs +++ b/crates/rocie-client/src/models/item_one_of_1.rs @@ -29,9 +29,6 @@ pub struct ItemOneOf1 { impl ItemOneOf1 { pub fn new(ingredient: models::ItemOneOf1Ingredient) -> ItemOneOf1 { - ItemOneOf1 { - ingredient, - } + ItemOneOf1 { ingredient } } } - diff --git a/crates/rocie-client/src/models/item_one_of_1_ingredient.rs b/crates/rocie-client/src/models/item_one_of_1_ingredient.rs index f31df49..0a2bb8f 100644 --- a/crates/rocie-client/src/models/item_one_of_1_ingredient.rs +++ b/crates/rocie-client/src/models/item_one_of_1_ingredient.rs @@ -29,9 +29,6 @@ pub struct ItemOneOf1Ingredient { impl ItemOneOf1Ingredient { pub fn new(index: u32) -> ItemOneOf1Ingredient { - ItemOneOf1Ingredient { - index, - } + ItemOneOf1Ingredient { index } } } - diff --git a/crates/rocie-client/src/models/item_one_of_2.rs b/crates/rocie-client/src/models/item_one_of_2.rs index cfe7918..31cf4f4 100644 --- a/crates/rocie-client/src/models/item_one_of_2.rs +++ b/crates/rocie-client/src/models/item_one_of_2.rs @@ -29,9 +29,6 @@ pub struct ItemOneOf2 { impl ItemOneOf2 { pub fn new(cookware: models::ItemOneOf1Ingredient) -> ItemOneOf2 { - ItemOneOf2 { - cookware, - } + ItemOneOf2 { cookware } } } - diff --git a/crates/rocie-client/src/models/item_one_of_3.rs b/crates/rocie-client/src/models/item_one_of_3.rs index 0baa898..fd8e8ab 100644 --- a/crates/rocie-client/src/models/item_one_of_3.rs +++ b/crates/rocie-client/src/models/item_one_of_3.rs @@ -29,9 +29,6 @@ pub struct ItemOneOf3 { impl ItemOneOf3 { pub fn new(timer: models::ItemOneOf1Ingredient) -> ItemOneOf3 { - ItemOneOf3 { - timer, - } + ItemOneOf3 { timer } } } - diff --git a/crates/rocie-client/src/models/item_one_of_4.rs b/crates/rocie-client/src/models/item_one_of_4.rs index 69ab303..dcb7d5f 100644 --- a/crates/rocie-client/src/models/item_one_of_4.rs +++ b/crates/rocie-client/src/models/item_one_of_4.rs @@ -29,9 +29,6 @@ pub struct ItemOneOf4 { impl ItemOneOf4 { pub fn new(inline_quantity: models::ItemOneOf1Ingredient) -> ItemOneOf4 { - ItemOneOf4 { - inline_quantity, - } + ItemOneOf4 { inline_quantity } } } - diff --git a/crates/rocie-client/src/models/item_one_of_text.rs b/crates/rocie-client/src/models/item_one_of_text.rs index 9116ac2..4542da4 100644 --- a/crates/rocie-client/src/models/item_one_of_text.rs +++ b/crates/rocie-client/src/models/item_one_of_text.rs @@ -31,9 +31,6 @@ pub struct ItemOneOfText { impl ItemOneOfText { /// Just plain text pub fn new(value: String) -> ItemOneOfText { - ItemOneOfText { - value, - } + ItemOneOfText { value } } } - diff --git a/crates/rocie-client/src/models/login_info.rs b/crates/rocie-client/src/models/login_info.rs index 918c1d7..d03607b 100644 --- a/crates/rocie-client/src/models/login_info.rs +++ b/crates/rocie-client/src/models/login_info.rs @@ -39,4 +39,3 @@ impl LoginInfo { } } } - diff --git a/crates/rocie-client/src/models/metadata.rs b/crates/rocie-client/src/models/metadata.rs index 751cb7d..d4e650a 100644 --- a/crates/rocie-client/src/models/metadata.rs +++ b/crates/rocie-client/src/models/metadata.rs @@ -46,4 +46,3 @@ impl Metadata { } } } - diff --git a/crates/rocie-client/src/models/name_and_url.rs b/crates/rocie-client/src/models/name_and_url.rs index 0628d21..a3c0036 100644 --- a/crates/rocie-client/src/models/name_and_url.rs +++ b/crates/rocie-client/src/models/name_and_url.rs @@ -37,4 +37,3 @@ impl NameAndUrl { } } } - diff --git a/crates/rocie-client/src/models/password_hash.rs b/crates/rocie-client/src/models/password_hash.rs index 46af183..f55a3f4 100644 --- a/crates/rocie-client/src/models/password_hash.rs +++ b/crates/rocie-client/src/models/password_hash.rs @@ -31,9 +31,6 @@ pub struct PasswordHash { impl PasswordHash { /// This is stored as an PHC password string. This type corresponds to the string representation of a PHC string as described in the [PHC string format specification][1]. PHC strings have the following format: ```text $<id>[$v=<version>][$<param>=<value>(,<param>=<value>)*][$<salt>[$<hash>]] ``` pub fn new(value: String) -> PasswordHash { - PasswordHash { - value, - } + PasswordHash { value } } } - diff --git a/crates/rocie-client/src/models/product.rs b/crates/rocie-client/src/models/product.rs index 3b17625..c612567 100644 --- a/crates/rocie-client/src/models/product.rs +++ b/crates/rocie-client/src/models/product.rs @@ -46,7 +46,12 @@ pub struct Product { impl Product { /// The base of rocie. Products can be bought and consumed and represent, what you actually have in storage. Not every product is bought, as some can also be obtained by cooking a recipe. - pub fn new(associated_bar_codes: Vec<models::Barcode>, id: models::ProductId, name: String, unit_property: models::UnitPropertyId) -> Product { + pub fn new( + associated_bar_codes: Vec<models::Barcode>, + id: models::ProductId, + name: String, + unit_property: models::UnitPropertyId, + ) -> Product { Product { associated_bar_codes, description: None, @@ -57,4 +62,3 @@ impl Product { } } } - diff --git a/crates/rocie-client/src/models/product_amount.rs b/crates/rocie-client/src/models/product_amount.rs index 43f968d..59891dd 100644 --- a/crates/rocie-client/src/models/product_amount.rs +++ b/crates/rocie-client/src/models/product_amount.rs @@ -31,10 +31,6 @@ pub struct ProductAmount { impl ProductAmount { pub fn new(amount: models::UnitAmount, product_id: models::ProductId) -> ProductAmount { - ProductAmount { - amount, - product_id, - } + ProductAmount { amount, product_id } } } - diff --git a/crates/rocie-client/src/models/product_id.rs b/crates/rocie-client/src/models/product_id.rs index a82ffc6..e6ca3a5 100644 --- a/crates/rocie-client/src/models/product_id.rs +++ b/crates/rocie-client/src/models/product_id.rs @@ -29,9 +29,6 @@ pub struct ProductId { impl ProductId { pub fn new(value: uuid::Uuid) -> ProductId { - ProductId { - value, - } + ProductId { value } } } - diff --git a/crates/rocie-client/src/models/product_parent.rs b/crates/rocie-client/src/models/product_parent.rs index af08e3a..25c1b7e 100644 --- a/crates/rocie-client/src/models/product_parent.rs +++ b/crates/rocie-client/src/models/product_parent.rs @@ -49,4 +49,3 @@ impl ProductParent { } } } - diff --git a/crates/rocie-client/src/models/product_parent_id.rs b/crates/rocie-client/src/models/product_parent_id.rs index 65b8faf..ae3e4e8 100644 --- a/crates/rocie-client/src/models/product_parent_id.rs +++ b/crates/rocie-client/src/models/product_parent_id.rs @@ -29,9 +29,6 @@ pub struct ProductParentId { impl ProductParentId { pub fn new(value: uuid::Uuid) -> ProductParentId { - ProductParentId { - value, - } + ProductParentId { value } } } - diff --git a/crates/rocie-client/src/models/product_parent_stub.rs b/crates/rocie-client/src/models/product_parent_stub.rs index 729b6d8..1d57c51 100644 --- a/crates/rocie-client/src/models/product_parent_stub.rs +++ b/crates/rocie-client/src/models/product_parent_stub.rs @@ -43,4 +43,3 @@ impl ProductParentStub { } } } - diff --git a/crates/rocie-client/src/models/product_stub.rs b/crates/rocie-client/src/models/product_stub.rs index 477dc4c..49086a7 100644 --- a/crates/rocie-client/src/models/product_stub.rs +++ b/crates/rocie-client/src/models/product_stub.rs @@ -47,4 +47,3 @@ impl ProductStub { } } } - diff --git a/crates/rocie-client/src/models/provision_info.rs b/crates/rocie-client/src/models/provision_info.rs index 4f64fc5..c5d2784 100644 --- a/crates/rocie-client/src/models/provision_info.rs +++ b/crates/rocie-client/src/models/provision_info.rs @@ -32,10 +32,6 @@ pub struct ProvisionInfo { impl ProvisionInfo { pub fn new(use_defaults: bool, user: models::UserStub) -> ProvisionInfo { - ProvisionInfo { - use_defaults, - user, - } + ProvisionInfo { use_defaults, user } } } - diff --git a/crates/rocie-client/src/models/recipe.rs b/crates/rocie-client/src/models/recipe.rs index 78b5ff0..811eba1 100644 --- a/crates/rocie-client/src/models/recipe.rs +++ b/crates/rocie-client/src/models/recipe.rs @@ -49,4 +49,3 @@ impl Recipe { } } } - diff --git a/crates/rocie-client/src/models/recipe_id.rs b/crates/rocie-client/src/models/recipe_id.rs index 9a20c06..6fede8b 100644 --- a/crates/rocie-client/src/models/recipe_id.rs +++ b/crates/rocie-client/src/models/recipe_id.rs @@ -29,9 +29,6 @@ pub struct RecipeId { impl RecipeId { pub fn new(value: uuid::Uuid) -> RecipeId { - RecipeId { - value, - } + RecipeId { value } } } - diff --git a/crates/rocie-client/src/models/recipe_parent.rs b/crates/rocie-client/src/models/recipe_parent.rs index e85e59a..56dc7e5 100644 --- a/crates/rocie-client/src/models/recipe_parent.rs +++ b/crates/rocie-client/src/models/recipe_parent.rs @@ -49,4 +49,3 @@ impl RecipeParent { } } } - diff --git a/crates/rocie-client/src/models/recipe_parent_id.rs b/crates/rocie-client/src/models/recipe_parent_id.rs index 9fdba6e..d78c197 100644 --- a/crates/rocie-client/src/models/recipe_parent_id.rs +++ b/crates/rocie-client/src/models/recipe_parent_id.rs @@ -29,9 +29,6 @@ pub struct RecipeParentId { impl RecipeParentId { pub fn new(value: uuid::Uuid) -> RecipeParentId { - RecipeParentId { - value, - } + RecipeParentId { value } } } - diff --git a/crates/rocie-client/src/models/recipe_parent_stub.rs b/crates/rocie-client/src/models/recipe_parent_stub.rs index 6c6d329..d526fdf 100644 --- a/crates/rocie-client/src/models/recipe_parent_stub.rs +++ b/crates/rocie-client/src/models/recipe_parent_stub.rs @@ -43,4 +43,3 @@ impl RecipeParentStub { } } } - diff --git a/crates/rocie-client/src/models/recipe_stub.rs b/crates/rocie-client/src/models/recipe_stub.rs index 60e448f..3cc2a91 100644 --- a/crates/rocie-client/src/models/recipe_stub.rs +++ b/crates/rocie-client/src/models/recipe_stub.rs @@ -43,4 +43,3 @@ impl RecipeStub { } } } - diff --git a/crates/rocie-client/src/models/refined_recipe.rs b/crates/rocie-client/src/models/refined_recipe.rs index bbb38a0..cec27c2 100644 --- a/crates/rocie-client/src/models/refined_recipe.rs +++ b/crates/rocie-client/src/models/refined_recipe.rs @@ -34,10 +34,6 @@ pub struct RefinedRecipe { impl RefinedRecipe { /// An refined recipe. This is a decoding of a recipe's cooklang description, already processed in a way to be consumed by a client. pub fn new(id: models::RecipeId, ingridients: Vec<models::ProductId>) -> RefinedRecipe { - RefinedRecipe { - id, - ingridients, - } + RefinedRecipe { id, ingridients } } } - diff --git a/crates/rocie-client/src/models/section.rs b/crates/rocie-client/src/models/section.rs index 1160bb9..a457c22 100644 --- a/crates/rocie-client/src/models/section.rs +++ b/crates/rocie-client/src/models/section.rs @@ -41,4 +41,3 @@ impl Section { } } } - diff --git a/crates/rocie-client/src/models/step.rs b/crates/rocie-client/src/models/step.rs index 9dc164f..3ad0367 100644 --- a/crates/rocie-client/src/models/step.rs +++ b/crates/rocie-client/src/models/step.rs @@ -35,10 +35,6 @@ pub struct Step { impl Step { /// A step holding step [`Item`]s pub fn new(items: Vec<models::Item>, number: u32) -> Step { - Step { - items, - number, - } + Step { items, number } } } - diff --git a/crates/rocie-client/src/models/timer.rs b/crates/rocie-client/src/models/timer.rs index 584d483..d2c249a 100644 --- a/crates/rocie-client/src/models/timer.rs +++ b/crates/rocie-client/src/models/timer.rs @@ -41,4 +41,3 @@ impl Timer { } } } - diff --git a/crates/rocie-client/src/models/unit.rs b/crates/rocie-client/src/models/unit.rs index d9e4a1f..336af0c 100644 --- a/crates/rocie-client/src/models/unit.rs +++ b/crates/rocie-client/src/models/unit.rs @@ -44,7 +44,13 @@ pub struct Unit { } impl Unit { - pub fn new(full_name_plural: String, full_name_singular: String, id: models::UnitId, short_name: String, unit_property: models::UnitPropertyId) -> Unit { + pub fn new( + full_name_plural: String, + full_name_singular: String, + id: models::UnitId, + short_name: String, + unit_property: models::UnitPropertyId, + ) -> Unit { Unit { description: None, full_name_plural, @@ -55,4 +61,3 @@ impl Unit { } } } - diff --git a/crates/rocie-client/src/models/unit_amount.rs b/crates/rocie-client/src/models/unit_amount.rs index eb54348..011f1b4 100644 --- a/crates/rocie-client/src/models/unit_amount.rs +++ b/crates/rocie-client/src/models/unit_amount.rs @@ -31,10 +31,6 @@ pub struct UnitAmount { impl UnitAmount { pub fn new(unit: models::UnitId, value: u32) -> UnitAmount { - UnitAmount { - unit, - value, - } + UnitAmount { unit, value } } } - diff --git a/crates/rocie-client/src/models/unit_id.rs b/crates/rocie-client/src/models/unit_id.rs index 99174e5..308e9ff 100644 --- a/crates/rocie-client/src/models/unit_id.rs +++ b/crates/rocie-client/src/models/unit_id.rs @@ -29,9 +29,6 @@ pub struct UnitId { impl UnitId { pub fn new(value: uuid::Uuid) -> UnitId { - UnitId { - value, - } + UnitId { value } } } - diff --git a/crates/rocie-client/src/models/unit_property.rs b/crates/rocie-client/src/models/unit_property.rs index ad051de..6c2b891 100644 --- a/crates/rocie-client/src/models/unit_property.rs +++ b/crates/rocie-client/src/models/unit_property.rs @@ -40,7 +40,11 @@ pub struct UnitProperty { impl UnitProperty { /// An unit property describes a property that can be measured by units. For example velocity, mass or volume. - pub fn new(id: models::UnitPropertyId, name: String, units: Vec<models::UnitId>) -> UnitProperty { + pub fn new( + id: models::UnitPropertyId, + name: String, + units: Vec<models::UnitId>, + ) -> UnitProperty { UnitProperty { description: None, id, @@ -49,4 +53,3 @@ impl UnitProperty { } } } - diff --git a/crates/rocie-client/src/models/unit_property_id.rs b/crates/rocie-client/src/models/unit_property_id.rs index 2063254..e47397b 100644 --- a/crates/rocie-client/src/models/unit_property_id.rs +++ b/crates/rocie-client/src/models/unit_property_id.rs @@ -29,9 +29,6 @@ pub struct UnitPropertyId { impl UnitPropertyId { pub fn new(value: uuid::Uuid) -> UnitPropertyId { - UnitPropertyId { - value, - } + UnitPropertyId { value } } } - diff --git a/crates/rocie-client/src/models/unit_property_stub.rs b/crates/rocie-client/src/models/unit_property_stub.rs index 53ef924..7ff7fad 100644 --- a/crates/rocie-client/src/models/unit_property_stub.rs +++ b/crates/rocie-client/src/models/unit_property_stub.rs @@ -39,4 +39,3 @@ impl UnitPropertyStub { } } } - diff --git a/crates/rocie-client/src/models/unit_stub.rs b/crates/rocie-client/src/models/unit_stub.rs index 422c0a8..e2ed467 100644 --- a/crates/rocie-client/src/models/unit_stub.rs +++ b/crates/rocie-client/src/models/unit_stub.rs @@ -36,7 +36,12 @@ pub struct UnitStub { } impl UnitStub { - pub fn new(full_name_plural: String, full_name_singular: String, short_name: String, unit_property: models::UnitPropertyId) -> UnitStub { + pub fn new( + full_name_plural: String, + full_name_singular: String, + short_name: String, + unit_property: models::UnitPropertyId, + ) -> UnitStub { UnitStub { description: None, full_name_plural, @@ -46,4 +51,3 @@ impl UnitStub { } } } - diff --git a/crates/rocie-client/src/models/user.rs b/crates/rocie-client/src/models/user.rs index e8628b9..a6417b4 100644 --- a/crates/rocie-client/src/models/user.rs +++ b/crates/rocie-client/src/models/user.rs @@ -49,4 +49,3 @@ impl User { } } } - diff --git a/crates/rocie-client/src/models/user_id.rs b/crates/rocie-client/src/models/user_id.rs index c9c8e21..3b690c1 100644 --- a/crates/rocie-client/src/models/user_id.rs +++ b/crates/rocie-client/src/models/user_id.rs @@ -29,9 +29,6 @@ pub struct UserId { impl UserId { pub fn new(value: uuid::Uuid) -> UserId { - UserId { - value, - } + UserId { value } } } - diff --git a/crates/rocie-client/src/models/user_stub.rs b/crates/rocie-client/src/models/user_stub.rs index b3ce91b..d8ed8c2 100644 --- a/crates/rocie-client/src/models/user_stub.rs +++ b/crates/rocie-client/src/models/user_stub.rs @@ -43,4 +43,3 @@ impl UserStub { } } } - |
