Unnecessary variable copy #1404

Closed
opened 2026-04-06 01:53:04 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @mvalois on 10/17/2023

Is that clone really necessary?
008a2cf298/src/api/admin.rs (L282)
Removing that line
008a2cf298/src/api/admin.rs (L287)
and moving ownership with

let mut user = User::new(data.email);

seems to be valid.

*Originally created by @mvalois on 10/17/2023* Is that clone really necessary? https://github.com/dani-garcia/vaultwarden/blob/008a2cf298a5c367568957c9290fd88bee9b44af/src/api/admin.rs#L282 Removing that line https://github.com/dani-garcia/vaultwarden/blob/008a2cf298a5c367568957c9290fd88bee9b44af/src/api/admin.rs#L287 and moving ownership with ```rust let mut user = User::new(data.email); ``` seems to be valid.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#1404