diff --git a/src/databases/sqlite.rs b/src/databases/sqlite.rs index 18fa17ca..39d8b9b9 100644 --- a/src/databases/sqlite.rs +++ b/src/databases/sqlite.rs @@ -475,7 +475,7 @@ impl Database for Sqlite { .bind(root_hash) .bind(torrent.info.source.clone()) .bind(torrent.comment.clone()) - .bind(torrent.creation_date.clone()) + .bind(torrent.creation_date) .bind(torrent.created_by.clone()) .bind(torrent.encoding.clone()) .execute(&mut *tx) diff --git a/src/models/torrent_file.rs b/src/models/torrent_file.rs index 4978cfc6..0d060095 100644 --- a/src/models/torrent_file.rs +++ b/src/models/torrent_file.rs @@ -91,7 +91,7 @@ impl Torrent { encoding: db_torrent.encoding.clone(), httpseeds: None, announce_list: Some(torrent_announce_urls), - creation_date: db_torrent.creation_date.clone(), + creation_date: db_torrent.creation_date, comment: db_torrent.comment.clone(), created_by: db_torrent.created_by.clone(), } diff --git a/src/services/torrent_file.rs b/src/services/torrent_file.rs index 6c0be1cb..3824ea9e 100644 --- a/src/services/torrent_file.rs +++ b/src/services/torrent_file.rs @@ -41,7 +41,7 @@ impl CreateTorrentRequest { encoding: self.encoding.clone(), httpseeds: None, announce_list: Some(self.announce_urls.clone()), - creation_date: self.creation_date.clone(), + creation_date: self.creation_date, comment: self.comment.clone(), created_by: self.created_by.clone(), } diff --git a/tests/e2e/web/api/v1/contexts/torrent/contract.rs b/tests/e2e/web/api/v1/contexts/torrent/contract.rs index 0b8fcf18..59f487b3 100644 --- a/tests/e2e/web/api/v1/contexts/torrent/contract.rs +++ b/tests/e2e/web/api/v1/contexts/torrent/contract.rs @@ -213,7 +213,7 @@ mod for_guests { tags: vec![], name: test_torrent.index_info.name.clone(), comment: test_torrent.file_info.comment.clone(), - creation_date: test_torrent.file_info.creation_date.clone(), + creation_date: test_torrent.file_info.creation_date, created_by: test_torrent.file_info.created_by.clone(), encoding: test_torrent.file_info.encoding.clone(), };