1
0
Fork 0
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:
Дамјан Георгиевски 2019-02-22 20:25:50 +01:00
commit 473f8b8e31
5 changed files with 15 additions and 15 deletions

View file

@ -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")
}