Windows specific fixes.
This commit is contained in:
parent
58161c18b7
commit
bc4297bbbb
1 changed files with 0 additions and 2 deletions
|
@ -220,7 +220,6 @@ fn terminal_size() -> Result<usize, i16> {
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
fn terminal_size() -> Result<usize, i16> {
|
fn terminal_size() -> Result<usize, i16> {
|
||||||
use windows_sys::Win32::System::Console::*;
|
use windows_sys::Win32::System::Console::*;
|
||||||
use colored::control;
|
|
||||||
|
|
||||||
if let Err(e) = control::set_virtual_terminal(true) {
|
if let Err(e) = control::set_virtual_terminal(true) {
|
||||||
panic!("Could not set terminal as virtual: {:?}", e);
|
panic!("Could not set terminal as virtual: {:?}", e);
|
||||||
|
@ -267,7 +266,6 @@ fn get_radkfile_path() -> Option<PathBuf> {
|
||||||
use std::os::windows::ffi::OsStringExt;
|
use std::os::windows::ffi::OsStringExt;
|
||||||
use windows_sys::Win32::Foundation::{MAX_PATH, S_OK};
|
use windows_sys::Win32::Foundation::{MAX_PATH, S_OK};
|
||||||
use windows_sys::Win32::UI::Shell::{SHGetFolderPathW, CSIDL_PROFILE};
|
use windows_sys::Win32::UI::Shell::{SHGetFolderPathW, CSIDL_PROFILE};
|
||||||
use std::env;
|
|
||||||
|
|
||||||
match env::var_os("USERPROFILE").filter(|s| !s.is_empty()).map(PathBuf::from) {
|
match env::var_os("USERPROFILE").filter(|s| !s.is_empty()).map(PathBuf::from) {
|
||||||
Some(path) => {
|
Some(path) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue