Skip to content

Migrate from deprecated bittorrent-primitives to torrust-info-hash #865

@josecelano

Description

@josecelano

The bittorrent-primitives crate has been deprecated and its repository archived. The InfoHash type has been moved to the torrust/torrust-bittorrent workspace and published as torrust-info-hash on crates.io.

Current dependency in Cargo.toml:

bittorrent-primitives = "0.1.0"

Target dependency:

torrust-info-hash = "0.1"

Changes needed

Dependency

  • Replace bittorrent-primitives with torrust-info-hash in Cargo.toml
  • Update Cargo.lock accordingly

Code

The import needs to be updated in src/web/api/server/v1/contexts/torrent/handlers.rs:

// Old:
use bittorrent_primitives::info_hash::InfoHash;

// New:
use torrust_info_hash::InfoHash;

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions