Skip to content

Commit

Permalink
refactor: rename struct field to avoid clippy error
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed Oct 27, 2023
1 parent 9777d26 commit 406abbf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions tests/common/contexts/torrent/asserts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ pub fn assert_expected_torrent_details(torrent: &TorrentDetails, expected_torren
("info_hash", torrent.info_hash == expected_torrent.info_hash),
("title", torrent.title == expected_torrent.title),
("description", torrent.description == expected_torrent.description),
(
"category.category_id",
torrent.category.category_id == expected_torrent.category.category_id,
),
("category.category_id", torrent.category.id == expected_torrent.category.id),
("category.name", torrent.category.name == expected_torrent.category.name),
("file_size", torrent.file_size == expected_torrent.file_size),
("seeders", torrent.seeders == expected_torrent.seeders),
Expand Down
2 changes: 1 addition & 1 deletion tests/common/contexts/torrent/responses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub struct TorrentDetails {

#[derive(Deserialize, PartialEq, Debug)]
pub struct Category {
pub category_id: CategoryId,
pub id: CategoryId,
pub name: String,
pub num_torrents: u64,
}
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/web/api/v1/contexts/torrent/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ mod for_guests {
title: test_torrent.index_info.title.clone(),
description: test_torrent.index_info.description,
category: Category {
category_id: software_predefined_category_id(),
id: software_predefined_category_id(),
name: test_torrent.index_info.category,
num_torrents: 19, // Ignored in assertion
},
Expand Down

0 comments on commit 406abbf

Please sign in to comment.