fix deprecation warning for bytes

This commit is contained in:
Reinier Balt 2018-04-30 14:28:43 +02:00
parent e6fff8003f
commit 870afdb4b6

View file

@ -45,7 +45,7 @@ impl Encoder for APCodec {
buf.reserve(3 + payload.len()); buf.reserve(3 + payload.len());
buf.put_u8(cmd); buf.put_u8(cmd);
buf.put_u16::<BigEndian>(payload.len() as u16); buf.put_u16_be(payload.len() as u16);
buf.extend_from_slice(&payload); buf.extend_from_slice(&payload);
self.encode_cipher.nonce_u32(self.encode_nonce); self.encode_cipher.nonce_u32(self.encode_nonce);