summaryrefslogtreecommitdiffstats
path: root/examples/info.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/info.rs')
-rw-r--r--examples/info.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/examples/info.rs b/examples/info.rs
index 05fdede..76036e6 100644
--- a/examples/info.rs
+++ b/examples/info.rs
@@ -1,12 +1,11 @@
use shiplift::Docker;
-use tokio::prelude::Future;
-fn main() {
+#[tokio::main]
+async fn main() {
let docker = Docker::new();
- tokio::run(
- docker
- .info()
- .map(|info| println!("info {:?}", info))
- .map_err(|e| eprintln!("Error: {}", e)),
- );
+
+ match docker.info().await {
+ Ok(info) => println!("info {:?}", info),
+ Err(e) => eprintln!("Error: {}", e),
+ }
}