Skip to content

Commit 2969df3

Browse files
committed
refactor: [#939] change config version
The current config version is 2 leaving the previous before the config averhaul as version 1.
1 parent 5aad462 commit 2969df3

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

packages/configuration/src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! Torrust Tracker, which is a `BitTorrent` tracker server.
55
//!
66
//! The current version for configuration is [`v1`].
7-
pub mod v1;
7+
pub mod v2;
88

99
use std::collections::HashMap;
1010
use std::env;
@@ -34,12 +34,12 @@ const ENV_VAR_CONFIG_TOML: &str = "TORRUST_TRACKER_CONFIG_TOML";
3434
/// The `tracker.toml` file location.
3535
pub const ENV_VAR_CONFIG_TOML_PATH: &str = "TORRUST_TRACKER_CONFIG_TOML_PATH";
3636

37-
pub type Configuration = v1::Configuration;
38-
pub type Core = v1::core::Core;
39-
pub type HealthCheckApi = v1::health_check_api::HealthCheckApi;
40-
pub type HttpApi = v1::tracker_api::HttpApi;
41-
pub type HttpTracker = v1::http_tracker::HttpTracker;
42-
pub type UdpTracker = v1::udp_tracker::UdpTracker;
37+
pub type Configuration = v2::Configuration;
38+
pub type Core = v2::core::Core;
39+
pub type HealthCheckApi = v2::health_check_api::HealthCheckApi;
40+
pub type HttpApi = v2::tracker_api::HttpApi;
41+
pub type HttpTracker = v2::http_tracker::HttpTracker;
42+
pub type UdpTracker = v2::udp_tracker::UdpTracker;
4343

4444
pub type AccessTokens = HashMap<String, String>;
4545

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use serde::{Deserialize, Serialize};
22

33
use super::network::Network;
4-
use crate::v1::database::Database;
4+
use crate::v2::database::Database;
55
use crate::{AnnouncePolicy, TrackerPolicy};
66

77
#[allow(clippy::struct_excessive_bools)]
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ mod tests {
357357

358358
use std::net::{IpAddr, Ipv4Addr};
359359

360-
use crate::v1::Configuration;
360+
use crate::v2::Configuration;
361361
use crate::Info;
362362

363363
#[cfg(test)]

packages/configuration/src/v1/tracker_api.rs renamed to packages/configuration/src/v2/tracker_api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl HttpApi {
6565

6666
#[cfg(test)]
6767
mod tests {
68-
use crate::v1::tracker_api::HttpApi;
68+
use crate::v2::tracker_api::HttpApi;
6969

7070
#[test]
7171
fn http_api_configuration_should_check_if_it_contains_a_token() {
File renamed without changes.

0 commit comments

Comments
 (0)