Skip to content
Snippets Groups Projects
Commit 296c68c0 authored by Jonas Platte's avatar Jonas Platte
Browse files

Merge branch 'get-thumbnail-mxc-as-ref' into 'next'

Do not copy mxc string unnecessarily in db.get_thumbnail()

See merge request famedly/conduit!272
parents 20006c91 529e88c7
No related branches found
No related tags found
No related merge requests found
...@@ -207,7 +207,7 @@ pub async fn get_content_thumbnail_route( ...@@ -207,7 +207,7 @@ pub async fn get_content_thumbnail_route(
}) = db }) = db
.media .media
.get_thumbnail( .get_thumbnail(
mxc.clone(), &mxc,
&db.globals, &db.globals,
body.width body.width
.try_into() .try_into()
......
...@@ -171,7 +171,7 @@ pub fn thumbnail_properties(&self, width: u32, height: u32) -> Option<(u32, u32, ...@@ -171,7 +171,7 @@ pub fn thumbnail_properties(&self, width: u32, height: u32) -> Option<(u32, u32,
/// For width,height <= 96 the server uses another thumbnailing algorithm which crops the image afterwards. /// For width,height <= 96 the server uses another thumbnailing algorithm which crops the image afterwards.
pub async fn get_thumbnail( pub async fn get_thumbnail(
&self, &self,
mxc: String, mxc: &str,
globals: &Globals, globals: &Globals,
width: u32, width: u32,
height: u32, height: u32,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment