From f9a5f7e3462526297b92dde9d39acb1029aad220 Mon Sep 17 00:00:00 2001 From: Jose Celano Date: Mon, 11 Mar 2024 10:05:46 +0000 Subject: [PATCH] chore: fix linting errors --- packages/configuration/src/lib.rs | 2 +- packages/primitives/src/lib.rs | 2 +- packages/test-helpers/src/configuration.rs | 6 +++--- src/servers/udp/error.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/configuration/src/lib.rs b/packages/configuration/src/lib.rs index 4b81aed8b..4068c046f 100644 --- a/packages/configuration/src/lib.rs +++ b/packages/configuration/src/lib.rs @@ -475,7 +475,7 @@ pub struct Configuration { /// peers from the torrent peer list. pub inactive_peer_cleanup_interval: u64, /// If enabled, the tracker will remove torrents that have no peers. - /// THe clean up torrent job runs every `inactive_peer_cleanup_interval` + /// The clean up torrent job runs every `inactive_peer_cleanup_interval` /// seconds and it removes inactive peers. Eventually, the peer list of a /// torrent could be empty and the torrent will be removed if this option is /// enabled. diff --git a/packages/primitives/src/lib.rs b/packages/primitives/src/lib.rs index e6f8cb93b..f6a14b9e8 100644 --- a/packages/primitives/src/lib.rs +++ b/packages/primitives/src/lib.rs @@ -19,7 +19,7 @@ pub enum DatabaseDriver { // TODO: Move to the database crate once that gets its own crate. /// The Sqlite3 database driver. Sqlite3, - /// The MySQL database driver. + /// The `MySQL` database driver. MySQL, } diff --git a/packages/test-helpers/src/configuration.rs b/packages/test-helpers/src/configuration.rs index 388d0151f..49cfdd390 100644 --- a/packages/test-helpers/src/configuration.rs +++ b/packages/test-helpers/src/configuration.rs @@ -55,7 +55,7 @@ pub fn ephemeral() -> Configuration { let temp_directory = env::temp_dir(); let random_db_id = random::string(16); let temp_file = temp_directory.join(format!("data_{random_db_id}.db")); - config.db_path = temp_file.to_str().unwrap().to_owned(); + temp_file.to_str().unwrap().clone_into(&mut config.db_path); config } @@ -138,8 +138,8 @@ pub fn ephemeral_ipv6() -> Configuration { let ipv6 = format!("[::]:{}", 0); - cfg.http_api.bind_address = ipv6.clone(); - cfg.http_trackers[0].bind_address = ipv6.clone(); + cfg.http_api.bind_address.clone_from(&ipv6); + cfg.http_trackers[0].bind_address.clone_from(&ipv6); cfg.udp_trackers[0].bind_address = ipv6; cfg diff --git a/src/servers/udp/error.rs b/src/servers/udp/error.rs index fb7bb93f3..315c9d1cf 100644 --- a/src/servers/udp/error.rs +++ b/src/servers/udp/error.rs @@ -13,7 +13,7 @@ pub enum Error { source: LocatedError<'static, dyn std::error::Error + Send + Sync>, }, - /// Error returned from a third-party library (aquatic_udp_protocol). + /// Error returned from a third-party library (`aquatic_udp_protocol`). #[error("internal server error: {message}, {location}")] InternalServer { location: &'static Location<'static>,