Skip to content

Commit cfaeaef

Browse files
committed
chore(workspace): migrate to Rust edition 2024
- Set `edition = "2024"` in workspace root `Cargo.toml` - Set `rust-version = "1.85"` in workspace root `Cargo.toml` - Run `cargo fix --edition` across all workspace packages - Replace `lazy_static!` with `std::sync::LazyLock` in `udp-tracker-core` and remove the `lazy_static` crate dependency - Wrap `std::env::set_var` in `unsafe {}` with safety comment in integration tests - Fix all new clippy denials triggered by edition 2024 and toolchain update: - `io_other_error`: use `io::Error::other(...)` throughout console CI helpers - `unnecessary_semicolon`: remove trailing `;` after match expressions in event handlers across `udp-tracker-core`, `http-tracker-core`, `udp-tracker-server` - `single_match_else`: convert nested match to `if let` in persistence benchmark DB probe helpers - `unnecessary_map_or`: use `is_none_or` in `src/app.rs` - `non_std_lazy_statics`: replace with `LazyLock` - `borrow_as_ptr`: use `&raw const` in repository tests - Fix `located-error` doctest assertion for edition 2024 doctest bundle path - Add `doctest` to `project-words.txt` - Update issue spec: mark all acceptance criteria DONE, record manual verification evidence, update progress log and workflow checkpoints All checks pass: - `linter all` exits 0 - 954 tests pass (0 failures) - `pre-commit.sh` exits 0 - No `rust-2024-compatibility` warnings in project source Closes torrust#1778
1 parent 42ea432 commit cfaeaef

219 files changed

Lines changed: 737 additions & 735 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
matchmakes peers and collects statistics, supporting the UDP, HTTP, and TLS socket types with
99
native IPv4/IPv6 support, private/whitelisted mode, and a management REST API.
1010

11-
- **Language**: Rust (edition 2021, MSRV 1.72)
11+
- **Language**: Rust (edition 2024, MSRV 1.85)
1212
- **License**: AGPL-3.0-only
1313
- **Version**: 3.0.0-develop
1414
- **Web framework**: [Axum](https://github.com/tokio-rs/axum)

Cargo.lock

Lines changed: 56 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ authors = [ "Nautilus Cyberneering <info@nautilus-cyberneering.de>, Mick van Dij
2323
categories = [ "network-programming", "web-programming" ]
2424
description = "A feature rich BitTorrent tracker."
2525
documentation = "https://docs.rs/crate/torrust-tracker/"
26-
edition = "2021"
26+
edition = "2024"
2727
homepage = "https://torrust.com/"
2828
keywords = [ "bittorrent", "file-sharing", "peer-to-peer", "torrent", "tracker" ]
2929
license = "AGPL-3.0-only"
3030
publish = true
3131
repository = "https://github.com/torrust/torrust-tracker"
32-
rust-version = "1.72"
32+
rust-version = "1.85"
3333
version = "3.0.0-develop"
3434

3535
[dependencies]

console/tracker-client/src/console/clients/checker/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ use url::Url;
6969
use super::config::Configuration;
7070
use super::console::Console;
7171
use super::error::{AppError, ConfigSource};
72-
use super::monitor::udp::{run_monitor, MonitorUdpConfig, DEFAULT_INFO_HASH};
72+
use super::monitor::udp::{DEFAULT_INFO_HASH, MonitorUdpConfig, run_monitor};
7373
use super::service::Service;
7474
use crate::console::clients::checker::config::parse_from_json;
7575

console/tracker-client/src/console/clients/checker/checks/http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::time::Duration;
44
use bittorrent_primitives::info_hash::InfoHash;
55
use bittorrent_tracker_client::http::client::responses::announce::Announce;
66
use bittorrent_tracker_client::http::client::responses::scrape;
7-
use bittorrent_tracker_client::http::client::{requests, Client};
7+
use bittorrent_tracker_client::http::client::{Client, requests};
88
use serde::Serialize;
99
use url::Url;
1010

console/tracker-client/src/console/clients/checker/checks/udp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use bittorrent_udp_tracker_protocol::TransactionId;
77
use serde::Serialize;
88
use url::Url;
99

10-
use crate::console::clients::udp::checker::{AnnounceParams, Client};
1110
use crate::console::clients::udp::Error;
11+
use crate::console::clients::udp::checker::{AnnounceParams, Client};
1212

1313
#[derive(Debug, Clone, Serialize)]
1414
pub struct Checks {

console/tracker-client/src/console/clients/checker/console.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::printer::{Printer, CLEAR_SCREEN};
1+
use super::printer::{CLEAR_SCREEN, Printer};
22

33
pub struct Console {}
44

console/tracker-client/src/console/clients/checker/logger.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::cell::RefCell;
22

3-
use super::printer::{Printer, CLEAR_SCREEN};
3+
use super::printer::{CLEAR_SCREEN, Printer};
44

55
pub struct Logger {
66
output: RefCell<String>,
@@ -50,7 +50,7 @@ impl Printer for Logger {
5050
#[cfg(test)]
5151
mod tests {
5252
use crate::console::clients::checker::logger::Logger;
53-
use crate::console::clients::checker::printer::{Printer, CLEAR_SCREEN};
53+
use crate::console::clients::checker::printer::{CLEAR_SCREEN, Printer};
5454

5555
#[test]
5656
fn should_capture_the_clear_screen_command() {

0 commit comments

Comments
 (0)