Fix up vendor for... linux?
This commit is contained in:
parent
b799fedeec
commit
81de013103
114 changed files with 21002 additions and 21002 deletions
52
vendor/crossterm_winapi/examples/console.rs
vendored
52
vendor/crossterm_winapi/examples/console.rs
vendored
|
|
@ -1,26 +1,26 @@
|
|||
#[cfg(windows)]
|
||||
use std::io::Result;
|
||||
|
||||
#[cfg(windows)]
|
||||
use crossterm_winapi::ConsoleMode;
|
||||
|
||||
#[cfg(windows)]
|
||||
fn change_console_mode() -> Result<()> {
|
||||
let console_mode = ConsoleMode::new()?;
|
||||
|
||||
// get the current console mode:
|
||||
let _mode: u32 = console_mode.mode()?;
|
||||
|
||||
// set the console mode (not sure if this is an actual value xp)
|
||||
console_mode.set_mode(10)
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
fn main() -> Result<()> {
|
||||
change_console_mode()
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
fn main() {
|
||||
println!("This example is for the Windows platform only.");
|
||||
}
|
||||
#[cfg(windows)]
|
||||
use std::io::Result;
|
||||
|
||||
#[cfg(windows)]
|
||||
use crossterm_winapi::ConsoleMode;
|
||||
|
||||
#[cfg(windows)]
|
||||
fn change_console_mode() -> Result<()> {
|
||||
let console_mode = ConsoleMode::new()?;
|
||||
|
||||
// get the current console mode:
|
||||
let _mode: u32 = console_mode.mode()?;
|
||||
|
||||
// set the console mode (not sure if this is an actual value xp)
|
||||
console_mode.set_mode(10)
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
fn main() -> Result<()> {
|
||||
change_console_mode()
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
fn main() {
|
||||
println!("This example is for the Windows platform only.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue