diff options
| author | Ubuntu <github@matdoes.dev> | 2022-11-10 17:50:41 +0000 |
|---|---|---|
| committer | Ubuntu <github@matdoes.dev> | 2022-11-10 17:50:41 +0000 |
| commit | dc62ada865db6534e7c4a5a958d82c44e42bf089 (patch) | |
| tree | 5102f4ac1593df59b8566caec8dd6ad13ecf5d3b | |
| parent | 0738ad038f9ce43a2311c76c28e6318dc35385da (diff) | |
| download | azalea-drasl-dc62ada865db6534e7c4a5a958d82c44e42bf089.tar.xz | |
fix clippy warnings
| -rw-r--r-- | azalea-client/src/client.rs | 6 | ||||
| -rw-r--r-- | azalea-protocol/src/connect.rs | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index 645497f6..8393a977 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -580,10 +580,12 @@ impl Client { let pos = ChunkPos::new(p.x, p.z); // let chunk = Chunk::read_with_world_height(&mut p.chunk_data); // debug("chunk {:?}") - client + if let Err(e) = client .dimension .lock() - .replace_with_packet_data(&pos, &mut Cursor::new(&p.chunk_data.data)); + .replace_with_packet_data(&pos, &mut Cursor::new(&p.chunk_data.data)) { + error!("Couldn't set chunk data: {}", e); + } } ClientboundGamePacket::LightUpdate(_p) => { // debug!("Got light update packet {:?}", p); diff --git a/azalea-protocol/src/connect.rs b/azalea-protocol/src/connect.rs index 83fbcb63..f67d0e4a 100644 --- a/azalea-protocol/src/connect.rs +++ b/azalea-protocol/src/connect.rs @@ -11,7 +11,7 @@ use crate::write::write_packet; use azalea_auth::sessionserver::SessionServerError; use azalea_crypto::{Aes128CfbDec, Aes128CfbEnc}; use bytes::BytesMut; -use log::info; +use log::{info, error}; use std::fmt::Debug; use std::marker::PhantomData; use std::net::SocketAddr; @@ -143,7 +143,9 @@ where // detect broken pipe if e.kind() == std::io::ErrorKind::BrokenPipe { info!("Broken pipe, shutting down connection."); - self.shutdown(); + if let Err(e) = self.shutdown().await { + error!("Couldn't shut down: {}", e); + } } return Err(e); } |
