mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-18 20:09:19 +00:00
remove some unneeded mutability
This commit is contained in:
parent
aeb4b4c8a5
commit
473f8b8e31
5 changed files with 15 additions and 15 deletions
|
|
@ -225,13 +225,13 @@ impl Invitation {
|
|||
Self { email }
|
||||
}
|
||||
|
||||
pub fn save(&mut self, conn: &DbConn) -> EmptyResult {
|
||||
pub fn save(&self, conn: &DbConn) -> EmptyResult {
|
||||
if self.email.trim().is_empty() {
|
||||
err!("Invitation email can't be empty")
|
||||
}
|
||||
|
||||
diesel::replace_into(invitations::table)
|
||||
.values(&*self)
|
||||
.values(self)
|
||||
.execute(&**conn)
|
||||
.map_res("Error saving invitation")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue