@@ -17,7 +17,7 @@ pub trait Entry {
17
17
fn get_stats ( & self ) -> SwarmMetadata ;
18
18
19
19
/// Returns True if Still a Valid Entry according to the Tracker Policy
20
- fn is_not_zombie ( & self , policy : & TrackerPolicy ) -> bool ;
20
+ fn is_good ( & self , policy : & TrackerPolicy ) -> bool ;
21
21
22
22
/// Returns True if the Peers is Empty
23
23
fn peers_is_empty ( & self ) -> bool ;
@@ -51,7 +51,7 @@ pub trait Entry {
51
51
#[ allow( clippy:: module_name_repetitions) ]
52
52
pub trait EntrySync {
53
53
fn get_stats ( & self ) -> SwarmMetadata ;
54
- fn is_not_zombie ( & self , policy : & TrackerPolicy ) -> bool ;
54
+ fn is_good ( & self , policy : & TrackerPolicy ) -> bool ;
55
55
fn peers_is_empty ( & self ) -> bool ;
56
56
fn get_peers_len ( & self ) -> usize ;
57
57
fn get_peers ( & self , limit : Option < usize > ) -> Vec < Arc < peer:: Peer > > ;
@@ -63,15 +63,13 @@ pub trait EntrySync {
63
63
64
64
#[ allow( clippy:: module_name_repetitions) ]
65
65
pub trait EntryAsync {
66
- fn get_stats ( self ) -> impl std:: future:: Future < Output = SwarmMetadata > + Send ;
67
-
68
- #[ allow( clippy:: wrong_self_convention) ]
69
- fn is_not_zombie ( self , policy : & TrackerPolicy ) -> impl std:: future:: Future < Output = bool > + Send ;
70
- fn peers_is_empty ( self ) -> impl std:: future:: Future < Output = bool > + Send ;
71
- fn get_peers_len ( self ) -> impl std:: future:: Future < Output = usize > + Send ;
72
- fn get_peers ( self , limit : Option < usize > ) -> impl std:: future:: Future < Output = Vec < Arc < peer:: Peer > > > + Send ;
66
+ fn get_stats ( & self ) -> impl std:: future:: Future < Output = SwarmMetadata > + Send ;
67
+ fn is_good ( & self , policy : & TrackerPolicy ) -> impl std:: future:: Future < Output = bool > + Send ;
68
+ fn peers_is_empty ( & self ) -> impl std:: future:: Future < Output = bool > + Send ;
69
+ fn get_peers_len ( & self ) -> impl std:: future:: Future < Output = usize > + Send ;
70
+ fn get_peers ( & self , limit : Option < usize > ) -> impl std:: future:: Future < Output = Vec < Arc < peer:: Peer > > > + Send ;
73
71
fn get_peers_for_peer (
74
- self ,
72
+ & self ,
75
73
client : & peer:: Peer ,
76
74
limit : Option < usize > ,
77
75
) -> impl std:: future:: Future < Output = Vec < Arc < peer:: Peer > > > + Send ;
@@ -94,5 +92,5 @@ pub struct Torrent {
94
92
// #[serde(skip)]
95
93
pub ( crate ) peers : std:: collections:: BTreeMap < peer:: Id , Arc < peer:: Peer > > ,
96
94
/// The number of peers that have ever completed downloading the torrent associated to this entry
97
- pub ( crate ) completed : u32 ,
95
+ pub ( crate ) downloaded : u32 ,
98
96
}
0 commit comments