Skip to content

Commit 4bd88e7

Browse files
committed
style: format .toml files
1 parent 0ff86da commit 4bd88e7

File tree

12 files changed

+94
-112
lines changed

12 files changed

+94
-112
lines changed

.vscode/extensions.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"recommendations": [
33
"streetsidesoftware.code-spell-checker",
4-
"rust-lang.rust-analyzer"
4+
"rust-lang.rust-analyzer",
5+
"tamasfe.even-better-toml"
56
]
67
}

.vscode/settings.json

+5
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@
2020
"-W",
2121
"clippy::pedantic",
2222
],
23+
"evenBetterToml.formatter.allowedBlankLines": 1,
24+
"evenBetterToml.formatter.columnWidth": 130,
25+
"evenBetterToml.formatter.trailingNewline": true,
26+
"evenBetterToml.formatter.reorderKeys": true,
27+
"evenBetterToml.formatter.reorderArrays": true,
2328
}

Cargo.toml

+31-47
Original file line numberDiff line numberDiff line change
@@ -14,89 +14,73 @@ repository.workspace = true
1414
rust-version.workspace = true
1515
version.workspace = true
1616

17-
1817
[workspace.package]
19-
authors = [
20-
"Nautilus Cyberneering <info@nautilus-cyberneering.de>, Mick van Dijke <mick@dutchbits.nl>",
21-
]
18+
authors = ["Nautilus Cyberneering <info@nautilus-cyberneering.de>, Mick van Dijke <mick@dutchbits.nl>"]
2219
categories = ["network-programming", "web-programming"]
2320
description = "A feature rich BitTorrent tracker."
2421
documentation = "https://docs.rs/crate/torrust-tracker/"
2522
edition = "2021"
2623
homepage = "https://torrust.com/"
27-
keywords = ["bittorrent", "tracker", "file-sharing", "peer-to-peer", "torrent"]
24+
keywords = ["bittorrent", "file-sharing", "peer-to-peer", "torrent", "tracker"]
2825
license-file = "COPYRIGHT"
2926
publish = true
3027
repository = "https://github.com/torrust/torrust-tracker"
3128
rust-version = "1.72"
3229
version = "3.0.0-alpha.6"
3330

34-
3531
[dependencies]
36-
tokio = { version = "1.29", features = [
37-
"rt-multi-thread",
38-
"net",
39-
"sync",
40-
"macros",
41-
"signal",
42-
] }
43-
serde = { version = "1.0", features = ["derive"] }
44-
serde_bencode = "^0.2"
45-
serde_json = "1.0"
46-
serde_with = "3.2"
47-
percent-encoding = "2.2"
32+
aquatic_udp_protocol = "0.8"
33+
async-trait = "0.1"
34+
axum = "0.6"
35+
axum-client-ip = "0.4"
36+
axum-server = { version = "0.5", features = ["tls-rustls"] }
4837
binascii = "0.1"
49-
lazy_static = "1.4"
50-
openssl = { version = "0.10", features = ["vendored"] }
38+
chrono = { version = "0.4", default-features = false, features = ["clock"] }
5139
config = "0.13"
52-
log = { version = "0.4", features = ["release_max_level_info"] }
40+
derive_more = "0.99"
5341
fern = "0.6"
54-
chrono = { version = "0.4", default-features = false, features = ["clock"] }
42+
futures = "0.3"
43+
hyper = "0.14"
44+
lazy_static = "1.4"
45+
log = { version = "0.4", features = ["release_max_level_info"] }
46+
multimap = "0.9"
47+
openssl = { version = "0.10", features = ["vendored"] }
48+
percent-encoding = "2.2"
5549
r2d2 = "0.8"
5650
r2d2_mysql = "24.0"
5751
r2d2_sqlite = { version = "0.22", features = ["bundled"] }
5852
rand = "0.8"
59-
derive_more = "0.99"
53+
serde = { version = "1.0", features = ["derive"] }
54+
serde_bencode = "^0.2"
55+
serde_json = "1.0"
56+
serde_with = "3.2"
6057
thiserror = "1.0"
61-
futures = "0.3"
62-
async-trait = "0.1"
63-
aquatic_udp_protocol = "0.8"
64-
uuid = { version = "1", features = ["v4"] }
65-
axum = "0.6"
66-
axum-server = { version = "0.5", features = ["tls-rustls"] }
67-
axum-client-ip = "0.4"
68-
tower-http = { version = "0.4", features = ["compression-full"] }
69-
torrust-tracker-contrib-bencode = { version = "3.0.0-alpha.6", path = "contrib/bencode" }
70-
torrust-tracker-primitives = { version = "3.0.0-alpha.6", path = "packages/primitives" }
58+
tokio = { version = "1.29", features = ["macros", "net", "rt-multi-thread", "signal", "sync"] }
7159
torrust-tracker-configuration = { version = "3.0.0-alpha.6", path = "packages/configuration" }
60+
torrust-tracker-contrib-bencode = { version = "3.0.0-alpha.6", path = "contrib/bencode" }
7261
torrust-tracker-located-error = { version = "3.0.0-alpha.6", path = "packages/located-error" }
73-
multimap = "0.9"
74-
hyper = "0.14"
62+
torrust-tracker-primitives = { version = "3.0.0-alpha.6", path = "packages/primitives" }
63+
tower-http = { version = "0.4", features = ["compression-full"] }
64+
uuid = { version = "1", features = ["v4"] }
7565

7666
[dev-dependencies]
67+
local-ip-address = "0.5"
7768
mockall = "0.11"
7869
reqwest = { version = "0.11.18", features = ["json"] }
79-
serde_urlencoded = "0.7"
80-
serde_repr = "0.1"
8170
serde_bytes = "0.11"
82-
local-ip-address = "0.5"
71+
serde_repr = "0.1"
72+
serde_urlencoded = "0.7"
8373
torrust-tracker-test-helpers = { version = "3.0.0-alpha.6", path = "packages/test-helpers" }
8474

8575
[workspace]
86-
members = [
87-
"contrib/bencode",
88-
"packages/configuration",
89-
"packages/primitives",
90-
"packages/test-helpers",
91-
"packages/located-error",
92-
]
76+
members = ["contrib/bencode", "packages/configuration", "packages/located-error", "packages/primitives", "packages/test-helpers"]
9377

9478
[profile.dev]
9579
debug = 1
96-
opt-level = 1
9780
lto = "thin"
81+
opt-level = 1
9882

9983
[profile.release]
10084
debug = 1
101-
opt-level = 3
10285
lto = "fat"
86+
opt-level = 3

contrib/bencode/Cargo.toml

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
[package]
2-
name = "torrust-tracker-contrib-bencode"
32
description = "(contrib) Efficient decoding and encoding for bencode."
4-
keywords = ["library", "contrib", "bencode"]
3+
keywords = ["bencode", "contrib", "library"]
4+
name = "torrust-tracker-contrib-bencode"
55
readme = "README.md"
66

7-
authors = [
8-
"Nautilus Cyberneering <info@nautilus-cyberneering.de>, Andrew <amiller4421@gmail.com>",
9-
]
10-
repository = "https://github.com/torrust/bittorrent-infrastructure-project"
7+
authors = ["Nautilus Cyberneering <info@nautilus-cyberneering.de>, Andrew <amiller4421@gmail.com>"]
118
license = "Apache-2.0"
9+
repository = "https://github.com/torrust/bittorrent-infrastructure-project"
1210

1311
documentation.workspace = true
1412
edition.workspace = true
@@ -17,7 +15,6 @@ publish.workspace = true
1715
rust-version.workspace = true
1816
version.workspace = true
1917

20-
2118
[dependencies]
2219
error-chain = "0.12"
2320

@@ -29,5 +26,5 @@ name = "test"
2926
path = "test/mod.rs"
3027

3128
[[bench]]
32-
name = "bencode_benchmark"
3329
harness = false
30+
name = "bencode_benchmark"

packages/configuration/Cargo.toml

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "torrust-tracker-configuration"
32
description = "A library to provide configuration to the Torrust Tracker."
4-
keywords = ["library", "config", "settings"]
3+
keywords = ["config", "library", "settings"]
4+
name = "torrust-tracker-configuration"
55
readme = "README.md"
66

77
authors.workspace = true
@@ -14,16 +14,15 @@ repository.workspace = true
1414
rust-version.workspace = true
1515
version.workspace = true
1616

17-
1817
[dependencies]
19-
serde = { version = "1.0", features = ["derive"] }
20-
serde_with = "3.2"
2118
config = "0.13"
22-
toml = "0.8"
2319
log = { version = "0.4", features = ["release_max_level_info"] }
20+
serde = { version = "1.0", features = ["derive"] }
21+
serde_with = "3.2"
2422
thiserror = "1.0"
25-
torrust-tracker-primitives = { version = "3.0.0-alpha.6", path = "../primitives" }
23+
toml = "0.8"
2624
torrust-tracker-located-error = { version = "3.0.0-alpha.6", path = "../located-error" }
25+
torrust-tracker-primitives = { version = "3.0.0-alpha.6", path = "../primitives" }
2726

2827
[dev-dependencies]
2928
uuid = { version = "1", features = ["v4"] }

packages/located-error/Cargo.toml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "torrust-tracker-located-error"
32
description = "A library to provide error decorator with the location and the source of the original error."
4-
keywords = ["library", "helper", "errors"]
3+
keywords = ["errors", "helper", "library"]
4+
name = "torrust-tracker-located-error"
55
readme = "README.md"
66

77
authors.workspace = true
@@ -14,7 +14,6 @@ repository.workspace = true
1414
rust-version.workspace = true
1515
version.workspace = true
1616

17-
1817
[dependencies]
1918
log = { version = "0.4", features = ["release_max_level_info"] }
2019

packages/primitives/Cargo.toml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "torrust-tracker-primitives"
32
description = "A library with the primitive types shared by the Torrust tracker packages."
4-
keywords = ["library", "api", "primitives"]
3+
keywords = ["api", "library", "primitives"]
4+
name = "torrust-tracker-primitives"
55
readme = "README.md"
66

77
authors.workspace = true
@@ -14,7 +14,6 @@ repository.workspace = true
1414
rust-version.workspace = true
1515
version.workspace = true
1616

17-
1817
[dependencies]
19-
serde = { version = "1.0", features = ["derive"] }
2018
derive_more = "0.99"
19+
serde = { version = "1.0", features = ["derive"] }

packages/test-helpers/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "torrust-tracker-test-helpers"
32
description = "A library providing helpers for testing the Torrust tracker."
4-
keywords = ["library", "helper", "testing"]
3+
keywords = ["helper", "library", "testing"]
4+
name = "torrust-tracker-test-helpers"
55
readme = "README.md"
66

77
authors.workspace = true

rustfmt.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
max_width = 130
2-
imports_granularity = "Module"
31
group_imports = "StdExternalCrate"
2+
imports_granularity = "Module"
3+
max_width = 130

share/default/config/tracker.container.mysql.toml

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
1-
log_level = "info"
2-
mode = "public"
1+
announce_interval = 120
32
db_driver = "MySQL"
43
db_path = "mysql://db_user:db_user_secret_password@mysql:3306/torrust_tracker"
5-
announce_interval = 120
4+
external_ip = "0.0.0.0"
5+
inactive_peer_cleanup_interval = 600
6+
log_level = "info"
7+
max_peer_timeout = 900
68
min_announce_interval = 120
9+
mode = "public"
710
on_reverse_proxy = false
8-
external_ip = "0.0.0.0"
9-
tracker_usage_statistics = true
1011
persistent_torrent_completed_stat = false
11-
max_peer_timeout = 900
12-
inactive_peer_cleanup_interval = 600
1312
remove_peerless_torrents = true
13+
tracker_usage_statistics = true
1414

1515
[[udp_trackers]]
16-
enabled = false
1716
bind_address = "0.0.0.0:6969"
17+
enabled = false
1818

1919
[[http_trackers]]
20-
enabled = false
2120
bind_address = "0.0.0.0:7070"
22-
ssl_enabled = false
21+
enabled = false
2322
ssl_cert_path = "/var/lib/torrust/tracker/tls/localhost.crt"
23+
ssl_enabled = false
2424
ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"
2525

2626
[http_api]
27-
enabled = true
2827
bind_address = "0.0.0.0:1212"
29-
ssl_enabled = false
28+
enabled = true
3029
ssl_cert_path = "/var/lib/torrust/tracker/tls/localhost.crt"
30+
ssl_enabled = false
3131
ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"
3232

33-
3433
# Please override the admin token setting the
3534
# `TORRUST_TRACKER_API_ADMIN_TOKEN`
3635
# environmental variable!

share/default/config/tracker.container.sqlite3.toml

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
1-
log_level = "info"
2-
mode = "public"
1+
announce_interval = 120
32
db_driver = "Sqlite3"
43
db_path = "/var/lib/torrust/tracker/database/sqlite3.db"
5-
announce_interval = 120
4+
external_ip = "0.0.0.0"
5+
inactive_peer_cleanup_interval = 600
6+
log_level = "info"
7+
max_peer_timeout = 900
68
min_announce_interval = 120
9+
mode = "public"
710
on_reverse_proxy = false
8-
external_ip = "0.0.0.0"
9-
tracker_usage_statistics = true
1011
persistent_torrent_completed_stat = false
11-
max_peer_timeout = 900
12-
inactive_peer_cleanup_interval = 600
1312
remove_peerless_torrents = true
13+
tracker_usage_statistics = true
1414

1515
[[udp_trackers]]
16-
enabled = false
1716
bind_address = "0.0.0.0:6969"
17+
enabled = false
1818

1919
[[http_trackers]]
20-
enabled = false
2120
bind_address = "0.0.0.0:7070"
22-
ssl_enabled = false
21+
enabled = false
2322
ssl_cert_path = "/var/lib/torrust/tracker/tls/localhost.crt"
23+
ssl_enabled = false
2424
ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"
2525

2626
[http_api]
27-
enabled = true
2827
bind_address = "0.0.0.0:1212"
29-
ssl_enabled = false
28+
enabled = true
3029
ssl_cert_path = "/var/lib/torrust/tracker/tls/localhost.crt"
30+
ssl_enabled = false
3131
ssl_key_path = "/var/lib/torrust/tracker/tls/localhost.key"
3232

33-
3433
# Please override the admin token setting the
3534
# `TORRUST_TRACKER_API_ADMIN_TOKEN`
3635
# environmental variable!

0 commit comments

Comments
 (0)