From 42ba817a4c423457a014f13cec3faba994770b21 Mon Sep 17 00:00:00 2001 From: Fabian Thies Date: Wed, 4 Aug 2021 13:25:41 +0200 Subject: [PATCH] Fix errors that occurred in the nightly build --- src/api/core/sends.rs | 4 ++-- src/db/models/send.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/core/sends.rs b/src/api/core/sends.rs index 0379deb5..aa4fd792 100644 --- a/src/api/core/sends.rs +++ b/src/api/core/sends.rs @@ -167,7 +167,7 @@ fn post_send(data: JsonUpcase, headers: Headers, conn: DbConn, nt: Not err!("File sends should use /api/sends/file") } - let mut send = create_send(data, headers.user.uuid.clone())?; + let mut send = create_send(data, headers.user.uuid)?; send.save(&conn)?; nt.send_send_update(UpdateType::SyncSendCreate, &send, &send.update_users_revision(&conn)); @@ -210,7 +210,7 @@ fn post_send_file(data: Data, content_type: &ContentType, headers: Headers, conn }; // Create the Send - let mut send = create_send(data.data, headers.user.uuid.clone())?; + let mut send = create_send(data.data, headers.user.uuid)?; let file_id = crate::crypto::generate_send_id(); if send.atype != SendType::File as i32 { diff --git a/src/db/models/send.rs b/src/db/models/send.rs index 05d366e4..9cfb7b1e 100644 --- a/src/db/models/send.rs +++ b/src/db/models/send.rs @@ -234,8 +234,8 @@ impl Send { pub fn update_users_revision(&self, conn: &DbConn) -> Vec { let mut user_uuids = Vec::new(); - match self.user_uuid { - Some(ref user_uuid) => { + match &self.user_uuid { + Some(user_uuid) => { User::update_uuid_revision(user_uuid, conn); user_uuids.push(user_uuid.clone()) }