summaryrefslogtreecommitdiff
path: root/src/api/profile
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2022-07-17 17:32:54 +0200
committerpennae <github@quasiparticle.net>2022-07-17 17:32:54 +0200
commit3eda99e9efbdfc2cb0e20932f20018d53baf5a64 (patch)
tree058d266f4a193bd4de931f39bb115c7225376507 /src/api/profile
parent1ef9d67fb6979ea91812c4ea892f7ecc12b3170f (diff)
downloadminor-skulk-3eda99e9efbdfc2cb0e20932f20018d53baf5a64.tar.gz
minor-skulk-3eda99e9efbdfc2cb0e20932f20018d53baf5a64.tar.xz
minor-skulk-3eda99e9efbdfc2cb0e20932f20018d53baf5a64.zip
make the Clone bytes types Copy as well
u8 arrays are copy, no need to not have our wrappers be copy.
Diffstat (limited to 'src/api/profile')
-rw-r--r--src/api/profile/mod.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/api/profile/mod.rs b/src/api/profile/mod.rs
index 9abb872..ecfec12 100644
--- a/src/api/profile/mod.rs
+++ b/src/api/profile/mod.rs
@@ -290,8 +290,7 @@ pub(crate) async fn avatar_upload(
sha.update(&data);
let id = AvatarID(sha.finalize()[0..16].try_into().unwrap());
- db.set_user_avatar(&req.session, Avatar { id: id.clone(), data, content_type: ct.to_string() })
- .await?;
+ db.set_user_avatar(&req.session, Avatar { id, data, content_type: ct.to_string() }).await?;
match db.get_devices(&req.session).await {
Ok(devs) => defer.spawn_after_success("api::profile/avatar/upload(post)", {
let (pc, db) = (Arc::clone(pc), db_pool.clone());