Do not copy mxc string unnecessarily in db.get_thumbnail()
This commit is contained in:
parent
20006c91af
commit
529e88c7f9
2 changed files with 2 additions and 2 deletions
|
@ -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 @@ impl Media {
|
||||||
/// 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,
|
||||||
|
|
Loading…
Add table
Reference in a new issue