From 6498dbfbb756baf3ec2c516217f806712db70a61 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Wed, 12 Jan 2022 04:28:02 +0900 Subject: [PATCH] Reuse form values --- src/routes/email_signups.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/routes/email_signups.rs b/src/routes/email_signups.rs index c874ec6c..82c5ccbd 100644 --- a/src/routes/email_signups.rs +++ b/src/routes/email_signups.rs @@ -206,11 +206,8 @@ pub fn signup( let mut err = ValidationErrors::default(); err.add("email", ValidationError::new("Email couldn't changed")); let form = NewUserForm { - username: form.username.clone(), - password: form.password.clone(), - password_confirmation: form.password_confirmation.clone(), email: signup.email, - token: form.token.clone(), + ..form.into_inner() }; return Ok(Response(render!(email_signups::edit( &(&conn, &rockets).to_context(),