]> git.lizzy.rs Git - rust.git/blobdiff - src/libterm/win.rs
Rollup merge of #68143 - skinny121:const-param-type-elided-lifetime, r=petrochenkov
[rust.git] / src / libterm / win.rs
index a789d739ab1741e3f3a777ddf5d89d0fd9cfd4ea..c24cf9518aa2539e9e829d9c6e6e081f5942634e 100644 (file)
@@ -89,7 +89,7 @@ fn bits_to_color(bits: u16) -> color::Color {
         _ => unreachable!(),
     };
 
-    color | (bits & 0x8) // copy the hi-intensity bit
+    color | (u32::from(bits) & 0x8) // copy the hi-intensity bit
 }
 
 impl<T: Write + Send + 'static> WinConsole<T> {
@@ -101,7 +101,7 @@ fn apply(&mut self) {
 
         unsafe {
             // Magic -11 means stdout, from
-            // http://msdn.microsoft.com/en-us/library/windows/desktop/ms683231%28v=vs.85%29.aspx
+            // https://docs.microsoft.com/en-us/windows/console/getstdhandle
             //
             // You may be wondering, "but what about stderr?", and the answer
             // to that is that setting terminal attributes on the stdout