fix deprecated use of std::u16 module

integer primitive type modules are deprecated, use
associated constants instead

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2021-10-04 14:57:39 +02:00
parent 5bff2a1d4b
commit f189895cef

View File

@ -206,7 +206,7 @@ pub fn create_frame(
if len < 126 {
buf.push(mask_bit | (len as u8));
} else if len < std::u16::MAX as usize {
} else if len < u16::MAX as usize {
buf.push(mask_bit | 126);
buf.extend_from_slice(&(len as u16).to_be_bytes());
} else {