Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: extract duplicate implementation of InfoHash struct #756

Conversation

josecelano
Copy link
Member

@josecelano josecelano commented Oct 30, 2024

To replace the `InfoHash` type with the one in this new dep.
The `InfoHash` struct has been extracted into a new crate to be reused
in other projects like the Torrust Tracker:

https://github.com/torrust/bittorrent-primitives
@josecelano
Copy link
Member Author

josecelano commented Oct 30, 2024

ACK 569fbd2

@josecelano josecelano added this to the v3.1.0 milestone Oct 30, 2024
It was used but the `info_hash` module that has been extracted into a
new package:

https://github.com/torrust/bittorrent-primitives
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.21%. Comparing base (65f108d) to head (569fbd2).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #756      +/-   ##
===========================================
- Coverage    40.05%   39.21%   -0.85%     
===========================================
  Files          117      116       -1     
  Lines         7212     7074     -138     
===========================================
- Hits          2889     2774     -115     
+ Misses        4323     4300      -23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@josecelano josecelano marked this pull request as ready for review October 30, 2024 18:21
josecelano added a commit to torrust/torrust-tracker that referenced this pull request Oct 31, 2024
… struct

7fe648c refactor: replace InfoHash with external extracted crate (Jose Celano)
7d7dba5 feat: add dep bittorrent-primitives (Jose Celano)

Pull request description:

  Relates to:
    - torrust/torrust-index#251
    - torrust/torrust-index#756

  The `InfoHash` type was duplicated here and in the [Index](torrust/torrust-index#251). I've extracted it into a new crate. I'm planning to move the very basic types that we are using in other projects.

  I'm also planning to extract more packages like:

  - UDP tracker client
  - HTTP tracker client
  - Tracker console client (after merging UDP console client, HTTP console client and Tracker checker). See #669

  Some of those new packages also depend on this new [bittorrent-primitives](https://github.com/torrust/bittorrent-primitives) crate.

ACKs for top commit:
  josecelano:
    ACK 7fe648c

Tree-SHA512: 3ab5b2ef8631ae72b792dea6b1c9ab1e64b28f170d4580109872739427f0f50ae753af014d691e41bdffbf3a33da732cba89fd1487b9e219345e74b15599b1b7
@josecelano josecelano merged commit c34b665 into torrust:develop Oct 31, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extract duplicate implementation of InfoHash struct
2 participants