Skip to content

Commit 235b40d

Browse files
committed
Declare some dependencies at the workspace level
1 parent 69c12f8 commit 235b40d

File tree

3 files changed

+54
-42
lines changed

3 files changed

+54
-42
lines changed

Cargo.toml

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,49 @@ license = "ISC"
2626
edition = "2024"
2727
rust-version = "1.88"
2828

29+
[workspace.dependencies]
30+
aformat = "0.1.3"
31+
dashmap = "6.1.0"
32+
extract_map = { version = "0.3.0", features = ["serde"] }
33+
futures = { version = "0.3.29", default-features = false, features = ["std"] }
34+
parking_lot = "0.12.1"
35+
reqwest = { version = "0.12.2", default-features = false, features = ["multipart", "stream", "json"] }
36+
serde = { version = "1.0.192", features = ["derive", "rc"] }
37+
serde_json = { version = "1.0.108", features = ["raw_value"] }
38+
small-fixed-array = { version = "0.4.10", features = ["serde"] }
39+
strum = { version = "0.26", features = ["derive"] }
40+
to-arraystring = "0.2.0"
41+
tokio = { version = "1.34.0", features = ["macros", "rt", "sync", "time", "io-util"] }
42+
tracing = { version = "0.1.40", features = ["log"] }
43+
typesize = { version = "0.1.13", features = ["url", "time", "serde_json", "secrecy", "parking_lot", "nonmax"] }
44+
url = { version = "2.4.1", features = ["serde"] }
45+
2946
[dependencies]
3047
# Serenity workspace crates
3148
serenity-core = { path = "serenity-core" }
3249

33-
# Required dependencies
50+
# Workspace dependencies
51+
aformat = { workspace = true, optional = true }
52+
dashmap = { workspace = true, optional = true }
53+
futures = { workspace = true }
54+
parking_lot = { workspace = true }
55+
reqwest = { workspace = true, optional = true }
56+
serde = { workspace = true }
57+
serde_json = { workspace = true }
58+
small-fixed-array = { workspace = true, optional = true }
59+
strum = { workspace = true, optional = true }
60+
to-arraystring = { workspace = true, optional = true }
61+
tokio = { workspace = true }
62+
tracing = { workspace = true, optional = true }
63+
typesize = { workspace = true, optional = true }
64+
url = { workspace = true, optional = true }
65+
66+
# Additional dependencies
3467
async-trait = "0.1.74"
35-
futures = { version = "0.3.29", default-features = false, features = ["std"] }
36-
serde = { version = "1.0.192", features = ["derive", "rc"] }
37-
serde_json = "1.0.108"
38-
tokio = { version = "1.34.0", features = ["macros", "rt", "sync", "time", "io-util"] }
39-
40-
# Optional dependencies
41-
aformat = { version = "0.1.3", optional = true }
42-
dashmap = { version = "6.1.0", optional = true }
4368
ed25519-dalek = { version = "2.0.0", optional = true }
44-
extract_map = { version = "0.3.0", features = ["serde"], optional = true }
69+
extract_map = { workspace = true, optional = true }
4570
flate2 = { version = "1.0.28", optional = true }
46-
mini-moka = { version = "0.10.2", optional = true }
47-
parking_lot = { version = "0.12.1"}
48-
reqwest = { version = "0.12.2", default-features = false, optional = true }
49-
small-fixed-array = { version = "0.4.10", features = ["serde"], optional = true }
50-
strum = { version = "0.26", features = ["derive"], optional = true }
51-
to-arraystring = { version = "0.2.0", optional = true }
5271
tokio-tungstenite = { version = "0.26.1", features = ["url"], optional = true }
53-
tracing = { version = "0.1.40", features = ["log"], optional = true }
54-
typesize = { version = "0.1.13", optional = true, features = ["url", "time", "serde_json", "secrecy", "parking_lot", "nonmax"] }
55-
url = { version = "2.4.1", features = ["serde"], optional = true }
5672
zstd-safe = { version = "7.2.1", optional = true }
5773

5874
[features]

serenity-core/Cargo.toml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,40 @@ rust-version.workspace = true
1414
# Serenity workspace crates
1515
serenity-voice-model = { version = "0.2.0", path = "../serenity-voice-model", optional = true }
1616

17+
# Workspace dependencies
18+
aformat = { workspace = true }
19+
dashmap = { workspace = true, optional = true }
20+
extract_map = { workspace = true }
21+
futures = { workspace = true, optional = true }
22+
parking_lot = { workspace = true }
23+
reqwest = { workspace = true, optional = true }
24+
serde = { workspace = true }
25+
serde_json = { workspace = true }
26+
small-fixed-array = { workspace = true }
27+
strum = { workspace = true }
28+
to-arraystring = { workspace = true }
29+
tokio = { workspace = true }
30+
tracing = { workspace = true }
31+
typesize = { workspace = true, optional = true }
32+
url = { workspace = true }
33+
1734
# Required dependencies
18-
aformat = "0.1.3"
1935
arrayvec = { version = "0.7.4", features = ["serde"] }
2036
base64 = "0.22.0"
2137
bitflags = "2.4.2"
2238
bool_to_bitflags = "0.1.2"
23-
extract_map = { version = "0.3.0", features = ["serde"] }
2439
nonmax = { version = "0.5.5", features = ["serde"] }
25-
parking_lot = { version = "0.12.1"}
2640
ref-cast = "1.0.23"
27-
serde = { version = "1.0.192", features = ["derive", "rc"] }
2841
serde_cow = "0.1.0"
29-
serde_json = { version = "1.0.108", features = ["raw_value"] }
30-
small-fixed-array = { version = "0.4", features = ["serde"] }
31-
strum = { version = "0.26", features = ["derive"] }
3242
time = { version = "0.3.36", features = ["formatting", "parsing", "serde-well-known"] }
33-
to-arraystring = "0.2.0"
34-
tokio = { version = "1.34.0", features = ["macros", "rt", "sync", "time", "io-util"] }
35-
tracing = { version = "0.1.40", features = ["log"] }
36-
url = { version = "2.4.1", features = ["serde"] }
3743
zeroize = "1.7"
3844

3945
# Optional dependencies
4046
bytes = { version = "1.5.0", optional = true }
4147
chrono = { version = "0.4.31", default-features = false, features = ["clock", "serde"], optional = true }
42-
dashmap = { version = "6.1.0", optional = true }
4348
foldhash = { version = "0.1.4", optional = true }
44-
futures = { version = "0.3.29", default-features = false, features = ["std"], optional = true }
4549
mime_guess = { version = "2.0.4", optional = true }
4650
percent-encoding = { version = "2.3.0", optional = true }
47-
reqwest = { version = "0.12.2", default-features = false, features = ["multipart", "stream", "json"], optional = true }
48-
typesize = { version = "0.1.13", optional = true, features = ["url", "time", "serde_json", "secrecy", "parking_lot", "nonmax"] }
4951
mini-moka = { version = "0.10.2", optional = true }
5052

5153
[dev-dependencies.http_crate]

serenity-voice-model/Cargo.toml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,10 @@ rust-version.workspace = true
1717
[dependencies]
1818
bitflags = "2.4"
1919
num-traits = "0.2"
20+
serde = { workspace = true }
21+
serde_json = { workspace = true }
2022
serde_repr = "0.1.5"
2123

22-
[dependencies.serde]
23-
version = "1"
24-
features = ["derive"]
25-
26-
[dependencies.serde_json]
27-
features = ["raw_value"]
28-
version = "1"
29-
3024
[dev-dependencies]
3125
criterion = "0.5"
3226
serde_test = "1"

0 commit comments

Comments
 (0)