Refactor: extract duplicate implementation of InfoHash struct#1066
Merged
josecelano merged 2 commits intotorrust:developfrom Oct 31, 2024
Merged
Conversation
f2c56f3 to
8719b00
Compare
The `InfoHash` struct has been extracted into a new crate to be reused in other projects like the Torrust Index: https://github.com/torrust/bittorrent-primitives
8719b00 to
7fe648c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1066 +/- ##
===========================================
- Coverage 77.32% 77.11% -0.21%
===========================================
Files 178 176 -2
Lines 10269 10085 -184
===========================================
- Hits 7940 7777 -163
+ Misses 2329 2308 -21 ☔ View full report in Codecov by Sentry. |
Member
Author
|
ACK 7fe648c |
josecelano
added a commit
to torrust/torrust-index
that referenced
this pull request
Oct 31, 2024
…struct 569fbd2 chore: remove unused dep binascii (Jose Celano) e58b314 refactor: replace InfoHash with external extracted crate (Jose Celano) 912715f feat: add dep bittorrent-primitives (Jose Celano) Pull request description: Relates to: - torrust/torrust-tracker#360 - torrust/torrust-tracker#1066 The `InfoHash` type was duplicated here and in the [Tracker](torrust/torrust-tracker#360). I've extracted it into a new crate: https://github.com/torrust/bittorrent-primitives ACKs for top commit: josecelano: ACK 569fbd2 Tree-SHA512: a09f849555067a08efe4609c68d38ca690ef7d3d795b81deeb3b6aa8f2cfa235082620745835f26155b80076a78f23c8eb99f46dbfb46a5da67a9c8b54c64691
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to:
InfoHashstruct torrust-index#251InfoHashstruct torrust-index#756The
InfoHashtype was duplicated here and in the Index. 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:
Some of those new packages also depend on this new bittorrent-primitives crate.