cursive/examples/hello_world.rs
Alexandre Bury f28ac264f1 Add prelude import module
Update examples to use it.
2016-07-20 21:25:14 -07:00

15 lines
280 B
Rust

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