aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-06-25 16:40:12 -0500
committermat <github@matdoes.dev>2022-06-25 16:40:12 -0500
commit978880b756aa052226f77c21e8e9de9b40070152 (patch)
tree0f66b76beb4b8eac36a4c9c84cb3d5d8ed8bac35
parent460bdfb8bbaf0969df6451a00fc3de214728aec0 (diff)
downloadazalea-drasl-978880b756aa052226f77c21e8e9de9b40070152.tar.xz
Fix warnings
-rw-r--r--azalea-client/src/client.rs2
-rw-r--r--azalea-client/src/movement.rs3
-rw-r--r--azalea-core/src/particle/mod.rs2
-rw-r--r--azalea-entity/src/data.rs2
-rwxr-xr-xazalea-protocol/packet-macros/src/lib.rs4
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs3
-rw-r--r--azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs2
-rw-r--r--bot/src/main.rs2
8 files changed, 8 insertions, 12 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs
index 11b098ca..9b3f7cdf 100644
--- a/azalea-client/src/client.rs
+++ b/azalea-client/src/client.rs
@@ -163,8 +163,6 @@ impl Client {
// just start up the game loop and we're ready!
- let game_loop_state = client.clone();
-
// if you get an error right here that means you're doing something with locks wrong
// read the error to see where the issue is
// you might be able to just drop the lock or put it in its own scope to fix
diff --git a/azalea-client/src/movement.rs b/azalea-client/src/movement.rs
index 7ab4ddc2..5247e0f0 100644
--- a/azalea-client/src/movement.rs
+++ b/azalea-client/src/movement.rs
@@ -8,7 +8,7 @@ impl Client {
let mut dimension_lock = self.dimension.lock().unwrap();
let dimension = dimension_lock.as_mut().unwrap();
- let mut player_lock = self.player.lock().unwrap();
+ let player_lock = self.player.lock().unwrap();
let player_id = if let Some(player_lock) = player_lock.entity(dimension) {
player_lock.id
@@ -35,7 +35,6 @@ impl Client {
.get(),
)
.await;
- println!("obtained lock on conn");
Ok(())
}
diff --git a/azalea-core/src/particle/mod.rs b/azalea-core/src/particle/mod.rs
index 3b2e9807..46f88407 100644
--- a/azalea-core/src/particle/mod.rs
+++ b/azalea-core/src/particle/mod.rs
@@ -256,7 +256,7 @@ impl McBufReadable for ParticleData {
}
impl McBufWritable for ParticleData {
- fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
+ fn write_into(&self, _buf: &mut impl Write) -> Result<(), std::io::Error> {
todo!()
}
}
diff --git a/azalea-entity/src/data.rs b/azalea-entity/src/data.rs
index f8468ecf..c9083893 100644
--- a/azalea-entity/src/data.rs
+++ b/azalea-entity/src/data.rs
@@ -116,7 +116,7 @@ impl McBufReadable for EntityDataValue {
}
impl McBufWritable for EntityDataValue {
- fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
+ fn write_into(&self, _buf: &mut impl Write) -> Result<(), std::io::Error> {
todo!();
}
}
diff --git a/azalea-protocol/packet-macros/src/lib.rs b/azalea-protocol/packet-macros/src/lib.rs
index 2e40cbd1..e1ed80fa 100755
--- a/azalea-protocol/packet-macros/src/lib.rs
+++ b/azalea-protocol/packet-macros/src/lib.rs
@@ -1,9 +1,9 @@
use proc_macro::TokenStream;
-use quote::{quote, ToTokens};
+use quote::quote;
use syn::{
self, braced,
parse::{Parse, ParseStream, Result},
- parse_macro_input, Data, DeriveInput, FieldsNamed, Ident, LitInt, Token,
+ parse_macro_input, DeriveInput, FieldsNamed, Ident, LitInt, Token,
};
fn as_packet_derive(input: TokenStream, state: proc_macro2::TokenStream) -> TokenStream {
diff --git a/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs b/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs
index ee3f21a2..0e680701 100755
--- a/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs
@@ -1,4 +1,3 @@
-use super::GamePacket;
use azalea_buf::McBuf;
use azalea_buf::McBufVarReadable;
use azalea_buf::{McBufReadable, McBufWritable, Readable, Writable};
@@ -236,7 +235,7 @@ impl McBufReadable for BrigadierNodeStub {
}
impl McBufWritable for BrigadierNodeStub {
- fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
+ fn write_into(&self, _buf: &mut impl Write) -> Result<(), std::io::Error> {
todo!()
}
}
diff --git a/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs b/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs
index a9ce57ad..53975cca 100644
--- a/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs
@@ -51,7 +51,7 @@ impl McBufReadable for ClientboundLevelParticlesPacket {
}
impl McBufWritable for ClientboundLevelParticlesPacket {
- fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
+ fn write_into(&self, _buf: &mut impl Write) -> Result<(), std::io::Error> {
todo!();
}
}
diff --git a/bot/src/main.rs b/bot/src/main.rs
index 825025d4..948ca1d6 100644
--- a/bot/src/main.rs
+++ b/bot/src/main.rs
@@ -38,7 +38,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// // println!("block state: {:?}", c);
// // }
// }
- Event::Chat(msg) => {
+ Event::Chat(_m) => {
let new_pos = {
let dimension_lock = client.dimension.lock().unwrap();
let dimension = dimension_lock.as_ref().unwrap();