The type TorrentsMetrics includes the same info as the SwarmMetadata:
torrust_tracker_primitives::swarm_metadata
pub struct SwarmMetadata {
pub downloaded: u32,
pub complete: u32,
pub incomplete: u32,
}
torrust_tracker_primitives::torrent_metrics
pub struct TorrentsMetrics {
pub complete: u64,
pub downloaded: u64,
pub incomplete: u64,
pub torrents: u64,
}
We could refactor it to:
torrust_tracker_primitives::torrent_metrics
pub struct TorrentsMetrics {
pub swarm_metadata: SwarmMetadata,
pub torrents: u64,
}
SwarmMetadata would not change.
What do you think @da2ce7?
IMPORTANT: do not start this refactor until I finish the Overhaul core::Tracker epic.
The type
TorrentsMetricsincludes the same info as theSwarmMetadata:We could refactor it to:
SwarmMetadatawould not change.What do you think @da2ce7?
IMPORTANT: do not start this refactor until I finish the Overhaul core::Tracker epic.