summaryrefslogtreecommitdiffstats
path: root/examples/manual-runtime.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/manual-runtime.rs')
-rw-r--r--examples/manual-runtime.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/manual-runtime.rs b/examples/manual-runtime.rs
index 6cbb8cd4..8e3e1299 100644
--- a/examples/manual-runtime.rs
+++ b/examples/manual-runtime.rs
@@ -60,7 +60,7 @@ fn run<F: Future<Item = (), Error = ()>>(f: F) -> Result<(), IoError> {
Ok(())
}
-fn main() {
+fn main() -> Result<(), Box<std::error::Error>> {
run(future::lazy(|| {
// Here comes the application logic. It can spawn further tasks by tokio_current_thread::spawn().
// It also can use the default reactor and create timeouts.
@@ -82,5 +82,6 @@ fn main() {
// We can spawn on the default executor, which is also the local one.
tokio::executor::spawn(deadline);
Ok(())
- })).unwrap();
+ }))?;
+ Ok(())
}