mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-07 10:12:42 +00:00
Remove Result<T, E: Debug> in preparation of deprecation as Rocket responder.
Removed unnecessary returns
This commit is contained in:
parent
b73ff886c3
commit
4c07f05b3a
2 changed files with 8 additions and 9 deletions
|
@ -61,7 +61,7 @@ use crate::error::MapResult;
|
|||
impl Attachment {
|
||||
#[cfg(feature = "postgresql")]
|
||||
pub fn save(&self, conn: &DbConn) -> EmptyResult {
|
||||
return diesel::insert_into(attachments::table)
|
||||
diesel::insert_into(attachments::table)
|
||||
.values(self)
|
||||
.on_conflict(attachments::id)
|
||||
.do_update()
|
||||
|
@ -72,7 +72,7 @@ impl Attachment {
|
|||
|
||||
#[cfg(not(feature = "postgresql"))]
|
||||
pub fn save(&self, conn: &DbConn) -> EmptyResult {
|
||||
return diesel::replace_into(attachments::table)
|
||||
diesel::replace_into(attachments::table)
|
||||
.values(self)
|
||||
.execute(&**conn)
|
||||
.map_res("Error saving attachment")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue