From ee72b571d02fc40d09491ff3f8bd231ff57c01d5 Mon Sep 17 00:00:00 2001 From: Austin Alvarado Date: Thu, 18 Jan 2024 05:59:55 +0000 Subject: [PATCH] Clippy fixes --- app/src/components/create_user_attribute.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/components/create_user_attribute.rs b/app/src/components/create_user_attribute.rs index 0e0f479..6c61305 100644 --- a/app/src/components/create_user_attribute.rs +++ b/app/src/components/create_user_attribute.rs @@ -68,7 +68,7 @@ impl CommonComponent for CreateUserAttributeForm { }; let req = create_user_attribute::Variables { name: model.attribute_name, - attribute_type: attribute_type, + attribute_type, is_editable: model.is_editable, is_list: model.is_list, is_visible: model.is_visible, @@ -107,8 +107,10 @@ impl Component for CreateUserAttributeForm { type Properties = (); fn create(_: &Context) -> Self { - let mut model = CreateUserAttributeModel::default(); - model.attribute_type = "String".to_string(); + let model = CreateUserAttributeModel { + attribute_type: "String".to_string(), + ..Default::default() + }; Self { common: CommonComponentParts::::create(), form: yew_form::Form::::new(model),