From 70e2dfed16da8d5130460ea15b47701e622f4a9f Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 8 Dec 2022 18:39:35 -0600 Subject: wrap_comments = true --- azalea-protocol/src/connect.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'azalea-protocol/src/connect.rs') diff --git a/azalea-protocol/src/connect.rs b/azalea-protocol/src/connect.rs index b21572e3..48401d03 100755 --- a/azalea-protocol/src/connect.rs +++ b/azalea-protocol/src/connect.rs @@ -226,12 +226,14 @@ impl Connection { }) } - /// Change our state from handshake to login. This is the state that is used for logging in. + /// Change our state from handshake to login. This is the state that is used + /// for logging in. pub fn login(self) -> Connection { Connection::from(self) } - /// Change our state from handshake to status. This is the state that is used for pinging the server. + /// Change our state from handshake to status. This is the state that is + /// used for pinging the server. pub fn status(self) -> Connection { Connection::from(self) } @@ -252,14 +254,16 @@ impl Connection { } } - /// Set the encryption key that is used to encrypt and decrypt packets. It's the same for both reading and writing. + /// Set the encryption key that is used to encrypt and decrypt packets. It's + /// the same for both reading and writing. pub fn set_encryption_key(&mut self, key: [u8; 16]) { let (enc_cipher, dec_cipher) = azalea_crypto::create_cipher(&key); self.reader.dec_cipher = Some(dec_cipher); self.writer.enc_cipher = Some(enc_cipher); } - /// Change our state from login to game. This is the state that's used when you're actually in the game. + /// Change our state from login to game. This is the state that's used when + /// you're actually in the game. pub fn game(self) -> Connection { Connection::from(self) } @@ -342,7 +346,8 @@ where R1: ProtocolPacket + Debug, W1: ProtocolPacket + Debug, { - /// Creates a `Connection` of a type from a `Connection` of another type. Useful for servers or custom packets. + /// Creates a `Connection` of a type from a `Connection` of another type. + /// Useful for servers or custom packets. pub fn from(connection: Connection) -> Connection where R2: ProtocolPacket + Debug, -- cgit v1.2.3