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:
parent
5bff2a1d4b
commit
f189895cef
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user