Nightly message
This commit is contained in:
parent
32d8ccfa24
commit
df65cc7c56
|
@ -1,9 +1,11 @@
|
||||||
extern crate libterm;
|
extern crate libterm;
|
||||||
|
|
||||||
use libterm::{TermRead, TermWrite, IntoRawMode, Key};
|
|
||||||
use std::io::{Write, stdout, stdin};
|
|
||||||
|
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
fn main() {
|
fn main() {
|
||||||
|
use libterm::{TermRead, TermWrite, IntoRawMode, Key};
|
||||||
|
use std::io::{Write, stdout, stdin};
|
||||||
|
|
||||||
let stdin = stdin();
|
let stdin = stdin();
|
||||||
let mut stdout = stdout().into_raw_mode().unwrap();
|
let mut stdout = stdout().into_raw_mode().unwrap();
|
||||||
|
|
||||||
|
@ -35,3 +37,7 @@ fn main() {
|
||||||
|
|
||||||
stdout.show_cursor().unwrap();
|
stdout.show_cursor().unwrap();
|
||||||
}
|
}
|
||||||
|
#[cfg(not(feature = "nightly"))]
|
||||||
|
fn main() {
|
||||||
|
println!("To run this example, you need to enable the `nightly` feature. Use Rust nightly and compile with `--features nightly`.")
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue