diff options
author | Mathieu Valois <[email protected]> | 2023-10-17 20:53:10 +0200 |
---|---|---|
committer | Mathieu Valois <[email protected]> | 2023-10-17 20:53:10 +0200 |
commit | ef5e0bd4e568359d13d16e779ba4312a30ae9f30 (patch) | |
tree | 2b28675784d4492b2ed2c3905e6b4a4c41c49220 /src/api/admin.rs | |
parent | 008a2cf298a5c367568957c9290fd88bee9b44af (diff) | |
download | vaultwarden-ef5e0bd4e568359d13d16e779ba4312a30ae9f30.tar.gz vaultwarden-ef5e0bd4e568359d13d16e779ba4312a30ae9f30.zip |
Remove unnecessary variable clone
Diffstat (limited to 'src/api/admin.rs')
-rw-r--r-- | src/api/admin.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/api/admin.rs b/src/api/admin.rs index 9eb965cc..200a58f1 100644 --- a/src/api/admin.rs +++ b/src/api/admin.rs @@ -279,12 +279,11 @@ async fn get_user_or_404(uuid: &str, conn: &mut DbConn) -> ApiResult<User> { #[post("/invite", data = "<data>")] async fn invite_user(data: Json<InviteData>, _token: AdminToken, mut conn: DbConn) -> JsonResult { let data: InviteData = data.into_inner(); - let email = data.email.clone(); if User::find_by_mail(&data.email, &mut conn).await.is_some() { err_code!("User already exists", Status::Conflict.code) } - let mut user = User::new(email); + let mut user = User::new(data.email); async fn _generate_invite(user: &User, conn: &mut DbConn) -> EmptyResult { if CONFIG.mail_enabled() { |