Skip to content

Commit d7d6a41

Browse files
author
MMelchor
committed
refactor: [torrust#303] store in the database the torrent fields creation_date created_by encoding
Fixed linting errors
1 parent c302735 commit d7d6a41

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/databases/sqlite.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ impl Database for Sqlite {
475475
.bind(root_hash)
476476
.bind(torrent.info.source.clone())
477477
.bind(torrent.comment.clone())
478-
.bind(torrent.creation_date.clone())
478+
.bind(torrent.creation_date)
479479
.bind(torrent.created_by.clone())
480480
.bind(torrent.encoding.clone())
481481
.execute(&mut tx)

src/models/torrent_file.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl Torrent {
9494
encoding: db_torrent.encoding.clone(),
9595
httpseeds: None,
9696
announce_list: Some(torrent_announce_urls),
97-
creation_date: db_torrent.creation_date.clone(),
97+
creation_date: db_torrent.creation_date,
9898
comment: db_torrent.comment.clone(),
9999
created_by: db_torrent.created_by.clone(),
100100
}

src/services/torrent_file.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl CreateTorrentRequest {
4141
encoding: self.encoding.clone(),
4242
httpseeds: None,
4343
announce_list: Some(self.announce_urls.clone()),
44-
creation_date: self.creation_date.clone(),
44+
creation_date: self.creation_date,
4545
comment: self.comment.clone(),
4646
created_by: self.created_by.clone(),
4747
}

tests/e2e/web/api/v1/contexts/torrent/contract.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ mod for_guests {
213213
tags: vec![],
214214
name: test_torrent.index_info.name.clone(),
215215
comment: test_torrent.file_info.comment.clone(),
216-
creation_date: test_torrent.file_info.creation_date.clone(),
216+
creation_date: test_torrent.file_info.creation_date,
217217
created_by: test_torrent.file_info.created_by.clone(),
218218
encoding: test_torrent.file_info.encoding.clone(),
219219
};

0 commit comments

Comments
 (0)