Skip to content

Commit

Permalink
Fix imports for Windows (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlyoshaVasilieva committed Feb 8, 2023
1 parent 6110006 commit 5a44857
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/tty/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub fn terminal_size() -> Option<(Width, Height)> {
/// move the cursor `n` lines up; return an empty string, just to
/// be aligned with the unix version.
pub fn move_cursor_up(n: usize) -> String {
use self::winapi::um::wincon::{SetConsoleCursorPosition, COORD};
use winapi::um::wincon::{SetConsoleCursorPosition, COORD};
if let Some((hand, csbi)) = get_csbi() {
unsafe {
SetConsoleCursorPosition(
Expand All @@ -33,13 +33,13 @@ pub fn move_cursor_up(n: usize) -> String {
}

fn get_csbi() -> Option<(
self::winapi::shared::ntdef::HANDLE,
self::winapi::um::wincon::CONSOLE_SCREEN_BUFFER_INFO,
winapi::shared::ntdef::HANDLE,
winapi::um::wincon::CONSOLE_SCREEN_BUFFER_INFO,
)> {
use self::winapi::shared::ntdef::HANDLE;
use self::winapi::um::processenv::GetStdHandle;
use self::winapi::um::winbase::STD_OUTPUT_HANDLE;
use self::winapi::um::wincon::{
use winapi::shared::ntdef::HANDLE;
use winapi::um::processenv::GetStdHandle;
use winapi::um::winbase::STD_OUTPUT_HANDLE;
use winapi::um::wincon::{
GetConsoleScreenBufferInfo, CONSOLE_SCREEN_BUFFER_INFO, COORD, SMALL_RECT,
};

Expand Down

0 comments on commit 5a44857

Please sign in to comment.