]> git.proxmox.com Git - proxmox.git/commitdiff
fix deprecated use of std::u16 module
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 4 Oct 2021 12:57:39 +0000 (14:57 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 4 Oct 2021 13:03:50 +0000 (15:03 +0200)
integer primitive type modules are deprecated, use
associated constants instead

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
proxmox-http/src/websocket/mod.rs

index 1fe10ae849fed9bc4bfd66422d62f0cefba3d39f..f77f1d6439a02464a58e4af5300768143cf772d5 100644 (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 {