Skip to content

Commit 2020162

Browse files
committed
chore: [#1243] minor changes in comments and format
1 parent 70c9b44 commit 2020162

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

packages/primitives/src/swarm_metadata.rs

+10-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@ use derive_more::Constructor;
66
/// See [BEP 48: Tracker Protocol Extension: Scrape](https://www.bittorrent.org/beps/bep_0048.html)
77
#[derive(Copy, Clone, Debug, PartialEq, Default, Constructor)]
88
pub struct SwarmMetadata {
9-
/// (i.e `completed`): The number of peers that have ever completed downloading
10-
pub downloaded: u32, //
11-
/// (i.e `seeders`): The number of active peers that have completed downloading (seeders)
12-
pub complete: u32, //seeders
13-
/// (i.e `leechers`): The number of active peers that have not completed downloading (leechers)
9+
/// (i.e `completed`): The number of peers that have ever completed
10+
/// downloading a given torrent.
11+
pub downloaded: u32,
12+
13+
/// (i.e `seeders`): The number of active peers that have completed
14+
/// downloading (seeders) a given torrent.
15+
pub complete: u32,
16+
17+
/// (i.e `leechers`): The number of active peers that have not completed
18+
/// downloading (leechers) a given torrent.
1419
pub incomplete: u32,
1520
}
1621

packages/primitives/src/torrent_metrics.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ use std::ops::AddAssign;
55
/// Metrics are aggregate values for all torrents.
66
#[derive(Copy, Clone, Debug, PartialEq, Default)]
77
pub struct TorrentsMetrics {
8-
/// Total number of seeders for all torrents
9-
pub complete: u64,
10-
/// Total number of peers that have ever completed downloading for all torrents.
8+
/// Total number of peers that have ever completed downloading for all
9+
/// torrents.
1110
pub downloaded: u64,
11+
12+
/// Total number of seeders for all torrents.
13+
pub complete: u64,
14+
1215
/// Total number of leechers for all torrents.
1316
pub incomplete: u64,
17+
1418
/// Total number of torrents.
1519
pub torrents: u64,
1620
}

0 commit comments

Comments
 (0)