aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol
diff options
context:
space:
mode:
authorEightFactorial <29801334+EightFactorial@users.noreply.github.com>2024-12-04 16:31:22 -0800
committerGitHub <noreply@github.com>2024-12-04 18:31:22 -0600
commit6379035b852f1b619565d27f5cee3b93042c2312 (patch)
tree30c858cfaf841d0fcc5a139f1507b9b67d768e8b /azalea-protocol
parent241c7527ce11177082dcc0ebc4152506946ee684 (diff)
downloadazalea-drasl-6379035b852f1b619565d27f5cee3b93042c2312.tar.xz
Update Bevy and migrate to workspace dependencies and package attributes (#181)
* Use workspace `Cargo.toml` for dependencies and package atributes * Fix a couple clippy warnings * Update bevy, update build script, move deps to workspace, and fix clippy warnings * Remove carrots from crate versions The default behavior is the same * Remove unused dependencies Compiles and all tests pass, so it should be fine * Update codegen to use `std::sync::LazyLock` instead of `once_cell::sync::Lazy` * Update Bevy to `0.15.0-rc.3` Surprisingly little needed to be changed * Update to bevy 0.15.0 * Fix leftover merge issues * Clarify the reason the swarm can't connect * Fix duplicate lint, remove `log` dependency
Diffstat (limited to 'azalea-protocol')
-rw-r--r--azalea-protocol/Cargo.toml29
-rw-r--r--azalea-protocol/azalea-protocol-macros/Cargo.toml11
-rw-r--r--azalea-protocol/src/lib.rs2
-rwxr-xr-xazalea-protocol/src/read.rs2
4 files changed, 20 insertions, 24 deletions
diff --git a/azalea-protocol/Cargo.toml b/azalea-protocol/Cargo.toml
index 1d053a76..fa8aa31b 100644
--- a/azalea-protocol/Cargo.toml
+++ b/azalea-protocol/Cargo.toml
@@ -1,17 +1,20 @@
[package]
-description = "Send and receive Minecraft packets."
-edition = "2021"
-license = "MIT"
name = "azalea-protocol"
-repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-protocol"
-version = "0.10.3+mc1.21.4"
+description = "Send and receive Minecraft packets."
+version = { workspace = true }
+edition = { workspace = true }
+license = { workspace = true }
+repository = { workspace = true }
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+[dev-dependencies]
+anyhow = { workspace = true }
+tracing = { workspace = true }
+tracing-subscriber = { workspace = true }
[dependencies]
async-recursion = { workspace = true }
azalea-auth = { path = "../azalea-auth", version = "0.10.0" }
-azalea-block = { path = "../azalea-block", default-features = false, version = "0.10.0" }
+azalea-block = { path = "../azalea-block", version = "0.10.0", default-features = false }
azalea-brigadier = { path = "../azalea-brigadier", version = "0.10.0", features = [
"azalea-buf",
] }
@@ -20,12 +23,12 @@ azalea-chat = { path = "../azalea-chat", version = "0.10.0", features = [
"numbers",
"azalea-buf",
] }
-azalea-core = { path = "../azalea-core", optional = true, version = "0.10.0", features = [
+azalea-core = { path = "../azalea-core", version = "0.10.0", optional = true, features = [
"serde",
] }
azalea-crypto = { path = "../azalea-crypto", version = "0.10.0" }
-azalea-entity = { version = "0.10.0", path = "../azalea-entity" }
-azalea-inventory = { version = "0.10.0", path = "../azalea-inventory" }
+azalea-entity = { path = "../azalea-entity", version = "0.10.0" }
+azalea-inventory = { path = "../azalea-inventory", version = "0.10.0" }
azalea-protocol-macros = { path = "./azalea-protocol-macros", version = "0.10.0" }
azalea-registry = { path = "../azalea-registry", version = "0.10.0" }
azalea-world = { path = "../azalea-world", version = "0.10.0" }
@@ -36,7 +39,6 @@ flate2 = { workspace = true }
futures = { workspace = true }
futures-lite = { workspace = true }
#futures-util = { workspace = true }
-log = { workspace = true }
serde = { workspace = true, features = ["serde_derive"] }
serde_json = { workspace = true }
simdnbt = { workspace = true }
@@ -52,8 +54,3 @@ uuid = { workspace = true }
connecting = []
default = ["packets"]
packets = ["connecting", "dep:azalea-core"]
-
-[dev-dependencies]
-anyhow = { workspace = true }
-tracing = { workspace = true }
-tracing-subscriber = { workspace = true }
diff --git a/azalea-protocol/azalea-protocol-macros/Cargo.toml b/azalea-protocol/azalea-protocol-macros/Cargo.toml
index 0b5e0fda..5f54fc37 100644
--- a/azalea-protocol/azalea-protocol-macros/Cargo.toml
+++ b/azalea-protocol/azalea-protocol-macros/Cargo.toml
@@ -1,14 +1,13 @@
[package]
-description = "Macros internally used in azalea-protocol."
-edition = "2021"
-license = "MIT"
name = "azalea-protocol-macros"
-version = "0.10.3+mc1.21.4"
-repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-protocol/azalea-protocol-macros"
+description = "Macros internally used in azalea-protocol."
+version = { workspace = true }
+edition = { workspace = true }
+license = { workspace = true }
+repository = { workspace = true }
[lib]
proc-macro = true
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
proc-macro2 = { workspace = true }
diff --git a/azalea-protocol/src/lib.rs b/azalea-protocol/src/lib.rs
index fb271433..be706ebe 100644
--- a/azalea-protocol/src/lib.rs
+++ b/azalea-protocol/src/lib.rs
@@ -41,7 +41,7 @@ pub struct ServerAddress {
pub port: u16,
}
-impl TryFrom<&'_ str> for ServerAddress {
+impl TryFrom<&str> for ServerAddress {
type Error = String;
/// Convert a Minecraft server address (host:port, the port is optional) to
diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs
index 3e333e52..8569ca73 100755
--- a/azalea-protocol/src/read.rs
+++ b/azalea-protocol/src/read.rs
@@ -350,7 +350,7 @@ where
.map_err(ReadPacketError::from)?;
}
- if log::log_enabled!(log::Level::Trace) {
+ if tracing::enabled!(tracing::Level::TRACE) {
const DO_NOT_CUT_OFF_PACKET_LOGS: bool = false;
let buf_string: String = {