Update ruma version

This commit is contained in:
Timo Kösters 2020-09-08 17:32:03 +02:00
parent 2a63d0955a
commit 1e8fbd8d50
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
33 changed files with 147 additions and 169 deletions

View file

@ -16,7 +16,7 @@ impl Media {
pub fn create(
&self,
mxc: String,
filename: Option<&String>,
filename: &Option<String>,
content_type: &str,
file: &[u8],
) -> Result<()> {
@ -25,7 +25,7 @@ impl Media {
key.extend_from_slice(&0_u32.to_be_bytes()); // Width = 0 if it's not a thumbnail
key.extend_from_slice(&0_u32.to_be_bytes()); // Height = 0 if it's not a thumbnail
key.push(0xff);
key.extend_from_slice(filename.map(|f| f.as_bytes()).unwrap_or_default());
key.extend_from_slice(filename.as_ref().map(|f| f.as_bytes()).unwrap_or_default());
key.push(0xff);
key.extend_from_slice(content_type.as_bytes());