cursive/examples/hello_world.rs
Alexandre Bury a4ca7bbf1e Rustfmt
2017-10-12 16:43:59 -07:00

19 lines
336 B
Rust

extern crate cursive;
use cursive::Cursive;
use cursive::views::TextView;
fn main() {
let mut siv = Cursive::new();
// We can quit by pressing `q`
siv.add_global_callback('q', Cursive::quit);
siv.add_layer(TextView::new(
"Hello World!\n\
Press q to quit the application.",
));
siv.run();
}