Explorar el Código

fix deprecation warning for bytes

Reinier Balt hace 7 años
padre
commit
870afdb4b6
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      core/src/connection/codec.rs

+ 1 - 1
core/src/connection/codec.rs

@@ -45,7 +45,7 @@ impl Encoder for APCodec {
 
         buf.reserve(3 + payload.len());
         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);
 
         self.encode_cipher.nonce_u32(self.encode_nonce);