diff options
Diffstat (limited to 'azalea-protocol/src')
| -rw-r--r-- | azalea-protocol/src/lib.rs | 2 | ||||
| -rwxr-xr-x | azalea-protocol/src/read.rs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/azalea-protocol/src/lib.rs b/azalea-protocol/src/lib.rs index 0b2db1cf..1bbb80d4 100644 --- a/azalea-protocol/src/lib.rs +++ b/azalea-protocol/src/lib.rs @@ -40,7 +40,7 @@ pub struct ServerAddress { pub port: u16, } -impl<'a> TryFrom<&'a 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 558e1072..67ea9aee 100755 --- a/azalea-protocol/src/read.rs +++ b/azalea-protocol/src/read.rs @@ -209,8 +209,8 @@ pub fn compression_decoder( /// The current protocol state must be passed as a generic. /// /// For the non-waiting version, see [`try_read_packet`]. -pub async fn read_packet<'a, P: ProtocolPacket + Debug, R>( - stream: &'a mut R, +pub async fn read_packet<P: ProtocolPacket + Debug, R>( + stream: &mut R, buffer: &mut BytesMut, compression_threshold: Option<u32>, cipher: &mut Option<Aes128CfbDec>, @@ -242,8 +242,8 @@ where Ok(Some(packet)) } -pub async fn read_raw_packet<'a, R>( - stream: &'a mut R, +pub async fn read_raw_packet<R>( + stream: &mut R, buffer: &mut BytesMut, compression_threshold: Option<u32>, // this has to be a &mut Option<T> instead of an Option<&mut T> because |
