mirror of
https://github.com/mat-1/azalea.git
synced 2024-09-19 22:52:32 +00:00
Fix warnings
This commit is contained in:
parent
460bdfb8bb
commit
978880b756
8 changed files with 8 additions and 12 deletions
|
@ -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
|
||||
|
|
|
@ -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(())
|
||||
}
|
||||
|
|
|
@ -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!()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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!();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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!()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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!();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue