fix fmt and clippy warnings

This commit is contained in:
hamidreza kalbasi 2021-06-06 16:58:32 +04:30 committed by Timo Kösters
parent 972caacdc2
commit 804105479c
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
3 changed files with 73 additions and 47 deletions

View file

@ -5,7 +5,12 @@ use ruma::{
EventId, MilliSecondsSinceUnixEpoch, ServerName, ServerSigningKeyId,
};
use rustls::{ServerCertVerifier, WebPKIVerifier};
use std::{collections::{BTreeMap, HashMap}, path::{PathBuf}, sync::{Arc, RwLock}, time::{Duration, Instant}};
use std::{
collections::{BTreeMap, HashMap},
path::PathBuf,
sync::{Arc, RwLock},
time::{Duration, Instant},
};
use tokio::sync::Semaphore;
use trust_dns_resolver::TokioAsyncResolver;
@ -279,7 +284,7 @@ impl Globals {
r
}
pub fn get_media_file(&self, key: &Vec<u8>) -> PathBuf {
pub fn get_media_file(&self, key: &[u8]) -> PathBuf {
let mut r = PathBuf::new();
r.push(self.config.database_path.clone());
r.push("media");