torrust-index
torrust-index copied to clipboard
Extract duplicate implementation of `InfoHash` struct
Relates to: https://github.com/torrust/torrust-tracker/issues/360
We are duplicating code for:
pub struct InfoHash(pub [u8; 20]);` struct
- https://github.com/torrust/torrust-tracker/blob/develop/src/shared/bit_torrent/info_hash.rs#L136-L167
- https://github.com/torrust/torrust-index-backend/blob/develop/src/models/info_hash.rs#L136-L167
We should extract a common BitTorrent protocol crate for both the Tracker and the Index Backend.
Documentation for the InfoHash have been improved here:
https://github.com/torrust/torrust-index-backend/pull/249/commits/bc04231c1d475cd323a8f6adb594c2dbaed052cc