@@ -8,18 +8,18 @@ use torrust_tracker_configuration::TrackerPolicy;
88use torrust_tracker_primitives:: pagination:: Pagination ;
99use torrust_tracker_primitives:: swarm_metadata:: SwarmMetadata ;
1010use torrust_tracker_primitives:: PersistentTorrents ;
11- use torrust_tracker_torrent_repository:: entry:: torrent:: Torrent ;
12- use torrust_tracker_torrent_repository:: Torrents ;
11+ use torrust_tracker_torrent_repository:: entry:: torrent:: TrackedTorrent ;
12+ use torrust_tracker_torrent_repository:: TorrentRepository ;
1313
1414use crate :: common:: repo:: Repo ;
1515use crate :: common:: torrent_peer_builder:: { a_completed_peer, a_started_peer} ;
1616
1717#[ fixture]
1818fn skip_list_mutex_std ( ) -> Repo {
19- Repo :: SkipMapMutexStd ( Torrents :: default ( ) )
19+ Repo :: SkipMapMutexStd ( TorrentRepository :: default ( ) )
2020}
2121
22- type Entries = Vec < ( InfoHash , Torrent ) > ;
22+ type Entries = Vec < ( InfoHash , TrackedTorrent ) > ;
2323
2424#[ fixture]
2525fn empty ( ) -> Entries {
@@ -28,26 +28,26 @@ fn empty() -> Entries {
2828
2929#[ fixture]
3030fn default ( ) -> Entries {
31- vec ! [ ( InfoHash :: default ( ) , Torrent :: default ( ) ) ]
31+ vec ! [ ( InfoHash :: default ( ) , TrackedTorrent :: default ( ) ) ]
3232}
3333
3434#[ fixture]
3535fn started ( ) -> Entries {
36- let mut torrent = Torrent :: default ( ) ;
36+ let mut torrent = TrackedTorrent :: default ( ) ;
3737 torrent. upsert_peer ( & a_started_peer ( 1 ) ) ;
3838 vec ! [ ( InfoHash :: default ( ) , torrent) ]
3939}
4040
4141#[ fixture]
4242fn completed ( ) -> Entries {
43- let mut torrent = Torrent :: default ( ) ;
43+ let mut torrent = TrackedTorrent :: default ( ) ;
4444 torrent. upsert_peer ( & a_completed_peer ( 2 ) ) ;
4545 vec ! [ ( InfoHash :: default ( ) , torrent) ]
4646}
4747
4848#[ fixture]
4949fn downloaded ( ) -> Entries {
50- let mut torrent = Torrent :: default ( ) ;
50+ let mut torrent = TrackedTorrent :: default ( ) ;
5151 let mut peer = a_started_peer ( 3 ) ;
5252 torrent. upsert_peer ( & peer) ;
5353 peer. event = AnnounceEvent :: Completed ;
@@ -58,17 +58,17 @@ fn downloaded() -> Entries {
5858
5959#[ fixture]
6060fn three ( ) -> Entries {
61- let mut started = Torrent :: default ( ) ;
61+ let mut started = TrackedTorrent :: default ( ) ;
6262 let started_h = & mut DefaultHasher :: default ( ) ;
6363 started. upsert_peer ( & a_started_peer ( 1 ) ) ;
6464 started. hash ( started_h) ;
6565
66- let mut completed = Torrent :: default ( ) ;
66+ let mut completed = TrackedTorrent :: default ( ) ;
6767 let completed_h = & mut DefaultHasher :: default ( ) ;
6868 completed. upsert_peer ( & a_completed_peer ( 2 ) ) ;
6969 completed. hash ( completed_h) ;
7070
71- let mut downloaded = Torrent :: default ( ) ;
71+ let mut downloaded = TrackedTorrent :: default ( ) ;
7272 let downloaded_h = & mut DefaultHasher :: default ( ) ;
7373 let mut downloaded_peer = a_started_peer ( 3 ) ;
7474 downloaded. upsert_peer ( & downloaded_peer) ;
@@ -86,10 +86,10 @@ fn three() -> Entries {
8686
8787#[ fixture]
8888fn many_out_of_order ( ) -> Entries {
89- let mut entries: HashSet < ( InfoHash , Torrent ) > = HashSet :: default ( ) ;
89+ let mut entries: HashSet < ( InfoHash , TrackedTorrent ) > = HashSet :: default ( ) ;
9090
9191 for i in 0 ..408 {
92- let mut entry = Torrent :: default ( ) ;
92+ let mut entry = TrackedTorrent :: default ( ) ;
9393 entry. upsert_peer ( & a_started_peer ( i) ) ;
9494
9595 entries. insert ( ( InfoHash :: from ( & i) , entry) ) ;
@@ -101,10 +101,10 @@ fn many_out_of_order() -> Entries {
101101
102102#[ fixture]
103103fn many_hashed_in_order ( ) -> Entries {
104- let mut entries: BTreeMap < InfoHash , Torrent > = BTreeMap :: default ( ) ;
104+ let mut entries: BTreeMap < InfoHash , TrackedTorrent > = BTreeMap :: default ( ) ;
105105
106106 for i in 0 ..408 {
107- let mut entry = Torrent :: default ( ) ;
107+ let mut entry = TrackedTorrent :: default ( ) ;
108108 entry. upsert_peer ( & a_started_peer ( i) ) ;
109109
110110 let hash: & mut DefaultHasher = & mut DefaultHasher :: default ( ) ;
0 commit comments