vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit ec8a9c82dffea31c3a08c07796e8ed3a46fbee68
parent 008a2cf298a5c367568957c9290fd88bee9b44af
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Sat, 21 Oct 2023 00:17:00 +0200

Merge pull request #3981 from teicee/3980-unnecessary-copy

Remove unnecessary variable clone
Diffstat:
Msrc/api/admin.rs | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 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() {