Skip to content

Fix deprecation build warnings #343

@josecelano

Description

@josecelano
$ cargo build
warning: use of deprecated method `tracker::Tracker::authenticate_request`: please use `authenticate` and `authorize` instead
   --> src/servers/udp/handlers.rs:109:10
    |
109 |         .authenticate_request(info_hash, &None)
    |          ^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

warning: use of deprecated method `tracker::Tracker::authenticate_request`: please use `authenticate` and `authorize` instead
   --> src/servers/udp/handlers.rs:228:39
    |
228 |         let scrape_entry = if tracker.authenticate_request(info_hash, &None).await.is_ok() {
    |                                       ^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated field `servers::apis::v1::context::auth_key::resources::AuthKey::valid_until`: please use `expiry_time` instead
  --> src/servers/apis/v1/context/auth_key/resources.rs:34:13
   |
34 |             valid_until: auth_key.valid_until.as_secs(),
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: `torrust-tracker` (lib) generated 3 warnings
    Finished dev [optimized + debuginfo] target(s) in 0.07s

Metadata

Metadata

Assignees

No one assigned

    Labels

    - Developer -Torrust Improvement ExperienceDependenciesRelated to DependenciesEasyGood for Newcomers

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions