diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/backend-dialog.rs | 4 | ||||
-rw-r--r-- | examples/input.rs | 4 | ||||
-rw-r--r-- | examples/message.rs | 4 | ||||
-rw-r--r-- | examples/question.rs | 4 |
4 files changed, 4 insertions, 12 deletions
diff --git a/examples/backend-dialog.rs b/examples/backend-dialog.rs index b6be492..e1491f4 100644 --- a/examples/backend-dialog.rs +++ b/examples/backend-dialog.rs @@ -1,12 +1,10 @@ // Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org> // SPDX-License-Identifier: MIT -use std::io::Result; - use dialog::backends; use dialog::DialogBox; -fn main() -> Result<()> { +fn main() -> dialog::Result<()> { let mut backend = backends::Dialog::new(); dialog::Message::new("This is a message.") diff --git a/examples/input.rs b/examples/input.rs index bb36fb6..d852a5e 100644 --- a/examples/input.rs +++ b/examples/input.rs @@ -1,11 +1,9 @@ // Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org> // SPDX-License-Identifier: MIT -use std::io::Result; - use dialog::DialogBox; -fn main() -> Result<()> { +fn main() -> dialog::Result<()> { let input1 = dialog::Input::new("Please enter something").show()?; let input2 = dialog::Input::new("Please enter something") .title("Input form") diff --git a/examples/message.rs b/examples/message.rs index a72ef00..6d1ea4d 100644 --- a/examples/message.rs +++ b/examples/message.rs @@ -1,11 +1,9 @@ // Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org> // SPDX-License-Identifier: MIT -use std::io::Result; - use dialog::DialogBox; -fn main() -> Result<()> { +fn main() -> dialog::Result<()> { dialog::Message::new("This is a message.").show()?; dialog::Message::new("This is a message.") diff --git a/examples/question.rs b/examples/question.rs index d9c0e91..f5a692a 100644 --- a/examples/question.rs +++ b/examples/question.rs @@ -1,11 +1,9 @@ // Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org> // SPDX-License-Identifier: MIT -use std::io::Result; - use dialog::DialogBox; -fn main() -> Result<()> { +fn main() -> dialog::Result<()> { let choice = dialog::Question::new("Do you want to continue?").show()?; println!("The user chose: {:?}", choice); Ok(()) |