Skip to content

Commit

Permalink
clippy: fix clippy errors, and most warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
da2ce7 committed Nov 29, 2022
1 parent f3cc562 commit 52d23ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/databases/mysql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ impl Database for MysqlDatabase {
let torrent_files: Vec<TorrentFile> = db_torrent_files
.into_iter()
.map(|tf| TorrentFile {
path: tf.path.unwrap_or("".to_string()).split('/').map(|v| v.to_string()).collect(),
path: tf.path.unwrap_or_default().split('/').map(|v| v.to_string()).collect(),
length: tf.length,
md5sum: tf.md5sum,
})
Expand Down
2 changes: 1 addition & 1 deletion src/databases/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ impl Database for SqliteDatabase {
let torrent_files: Vec<TorrentFile> = db_torrent_files
.into_iter()
.map(|tf| TorrentFile {
path: tf.path.unwrap_or("".to_string()).split('/').map(|v| v.to_string()).collect(),
path: tf.path.unwrap_or_default().split('/').map(|v| v.to_string()).collect(),
length: tf.length,
md5sum: tf.md5sum,
})
Expand Down
2 changes: 1 addition & 1 deletion src/mailer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl MailerService {

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

let mut base_url = base_url.clone();
let mut base_url = &base_url.to_string();
if let Some(cfg_base_url) = &settings.net.base_url {
base_url = cfg_base_url;
}
Expand Down

0 comments on commit 52d23ee

Please sign in to comment.