mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
fix clippy warnings
This commit is contained in:
parent
0738ad038f
commit
dc62ada865
2 changed files with 8 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue