Permit use of mem::uninitialized via allow(deprecated)

This commit is contained in:
Mark Rousskov 2019-07-04 11:24:56 -04:00
parent 8a7dded1a2
commit 007d87f171
20 changed files with 30 additions and 9 deletions

View file

@ -108,6 +108,7 @@ impl<T: Write + Send + 'static> WinConsole<T> {
let fg;
let bg;
unsafe {
#[allow(deprecated)]
let mut buffer_info = ::std::mem::uninitialized();
if GetConsoleScreenBufferInfo(GetStdHandle(-11i32 as DWORD), &mut buffer_info) != 0 {
fg = bits_to_color(buffer_info.wAttributes);