From 51425fca70702b74ea64b29984da103a5bcbc7bc Mon Sep 17 00:00:00 2001 From: nickelc Date: Sun, 21 May 2023 22:48:27 +0200 Subject: [PATCH] Update `windows-sys` to 0.48 (#163) --- Cargo.toml | 2 +- src/windows_term/mod.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a5daa917..b9a577eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ lazy_static = "1.4.0" encode_unicode = "0.3" [target.'cfg(windows)'.dependencies.windows-sys] -version = "0.45.0" +version = "0.48.0" features = [ "Win32_Foundation", "Win32_System_Console", diff --git a/src/windows_term/mod.rs b/src/windows_term/mod.rs index c4ec193c..bad5f08d 100644 --- a/src/windows_term/mod.rs +++ b/src/windows_term/mod.rs @@ -13,7 +13,7 @@ use std::{char, mem::MaybeUninit}; use encode_unicode::error::InvalidUtf16Tuple; use encode_unicode::CharExt; -use windows_sys::Win32::Foundation::{CHAR, HANDLE, INVALID_HANDLE_VALUE, MAX_PATH}; +use windows_sys::Win32::Foundation::{HANDLE, INVALID_HANDLE_VALUE, MAX_PATH}; use windows_sys::Win32::Storage::FileSystem::{ FileNameInfo, GetFileInformationByHandleEx, FILE_NAME_INFO, }; @@ -225,7 +225,7 @@ pub fn clear_line(out: &Term) -> io::Result<()> { Y: csbi.dwCursorPosition.Y, }; let mut written = 0; - FillConsoleOutputCharacterA(hand, b' ' as CHAR, width as u32, pos, &mut written); + FillConsoleOutputCharacterA(hand, b' ', width as u32, pos, &mut written); FillConsoleOutputAttribute(hand, csbi.wAttributes, width as u32, pos, &mut written); SetConsoleCursorPosition(hand, pos); } @@ -245,7 +245,7 @@ pub fn clear_chars(out: &Term, n: usize) -> io::Result<()> { Y: csbi.dwCursorPosition.Y, }; let mut written = 0; - FillConsoleOutputCharacterA(hand, b' ' as CHAR, width as u32, pos, &mut written); + FillConsoleOutputCharacterA(hand, b' ', width as u32, pos, &mut written); FillConsoleOutputAttribute(hand, csbi.wAttributes, width as u32, pos, &mut written); SetConsoleCursorPosition(hand, pos); } @@ -262,7 +262,7 @@ pub fn clear_screen(out: &Term) -> io::Result<()> { let cells = csbi.dwSize.X as u32 * csbi.dwSize.Y as u32; // as u32, or else this causes stack overflows. let pos = COORD { X: 0, Y: 0 }; let mut written = 0; - FillConsoleOutputCharacterA(hand, b' ' as CHAR, cells, pos, &mut written); // cells as u32 no longer needed. + FillConsoleOutputCharacterA(hand, b' ', cells, pos, &mut written); // cells as u32 no longer needed. FillConsoleOutputAttribute(hand, csbi.wAttributes, cells, pos, &mut written); SetConsoleCursorPosition(hand, pos); } @@ -283,7 +283,7 @@ pub fn clear_to_end_of_screen(out: &Term) -> io::Result<()> { Y: csbi.dwCursorPosition.Y, }; let mut written = 0; - FillConsoleOutputCharacterA(hand, b' ' as CHAR, cells, pos, &mut written); // cells as u32 no longer needed. + FillConsoleOutputCharacterA(hand, b' ', cells, pos, &mut written); // cells as u32 no longer needed. FillConsoleOutputAttribute(hand, csbi.wAttributes, cells, pos, &mut written); SetConsoleCursorPosition(hand, pos); }