Skip to content

Commit

Permalink
Use terminal::events() in example
Browse files Browse the repository at this point in the history
  • Loading branch information
nabijaczleweli committed Jan 14, 2016
1 parent 37d7f9c commit fc81f1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ fn main() {
terminal::print_xy(0, 5, &*&string);
}
terminal::refresh();
while let Some(event) = terminal::wait_event() {
for event in terminal::events() {
match event {
Event::Resize{width, height} => {
Event::Resize{width, height} => {
terminal::print_xy(0, 0, &*&format!("Width: {}\nHeight: {}", width, height));
terminal::refresh();
},
Expand Down

0 comments on commit fc81f1c

Please sign in to comment.