mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-10-24 17:03:43 +03:00
remove some unneeded mutability
This commit is contained in:
1 parent
aeb4b4c8a5
commit
473f8b8e31
5 files changed
+15
-15
No files matched your search
@@ -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")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user