Skip to content

Commit 52d23ee

Browse files
committed
clippy: fix clippy errors, and most warnings
1 parent f3cc562 commit 52d23ee

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/databases/mysql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ impl Database for MysqlDatabase {
563563
let torrent_files: Vec<TorrentFile> = db_torrent_files
564564
.into_iter()
565565
.map(|tf| TorrentFile {
566-
path: tf.path.unwrap_or("".to_string()).split('/').map(|v| v.to_string()).collect(),
566+
path: tf.path.unwrap_or_default().split('/').map(|v| v.to_string()).collect(),
567567
length: tf.length,
568568
md5sum: tf.md5sum,
569569
})

src/databases/sqlite.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ impl Database for SqliteDatabase {
558558
let torrent_files: Vec<TorrentFile> = db_torrent_files
559559
.into_iter()
560560
.map(|tf| TorrentFile {
561-
path: tf.path.unwrap_or("".to_string()).split('/').map(|v| v.to_string()).collect(),
561+
path: tf.path.unwrap_or_default().split('/').map(|v| v.to_string()).collect(),
562562
length: tf.length,
563563
md5sum: tf.md5sum,
564564
})

src/mailer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ impl MailerService {
126126

127127
let token = encode(&Header::default(), &claims, &EncodingKey::from_secret(key)).unwrap();
128128

129-
let mut base_url = base_url.clone();
129+
let mut base_url = &base_url.to_string();
130130
if let Some(cfg_base_url) = &settings.net.base_url {
131131
base_url = cfg_base_url;
132132
}

0 commit comments

Comments
 (0)