From 163f01990846d0b01e85a20bd14db1c7382a8ed0 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Tue, 19 May 2015 11:01:16 -0700 Subject: [PATCH] Update readme example --- Readme.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Readme.md b/Readme.md index 211c1a5..9790dcc 100644 --- a/Readme.md +++ b/Readme.md @@ -8,16 +8,17 @@ It is designed to be safe and easy to use: ```rust extern crate cursive; -use cursive::{Cursive,Dialog}; +use cursive::{Cursive,Dialog,TextView}; fn main() { - let mut siv = Cursive::new(); + let mut siv = Cursive::new(); - // Create a popup window with a "Ok" button that quits the application - siv.add_layer(Dialog::new("Hello world!").button("Ok", |s, _| s.quit())); + // Create a popup window with a "Ok" button that quits the application + siv.add_layer(Dialog::new(TextView::new("Hello world!")) + .button("Quit", |s, _| s.quit())); - // Starts the event loop. - siv.run(); + // Starts the event loop. + siv.run(); } ```