summaryrefslogtreecommitdiffstats
path: root/ipfs-api/examples/get_commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ipfs-api/examples/get_commands.rs')
-rw-r--r--ipfs-api/examples/get_commands.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/ipfs-api/examples/get_commands.rs b/ipfs-api/examples/get_commands.rs
index b12ffa1..f99167d 100644
--- a/ipfs-api/examples/get_commands.rs
+++ b/ipfs-api/examples/get_commands.rs
@@ -6,7 +6,10 @@
// copied, modified, or distributed except according to those terms.
//
+#[cfg(feature = "actix")]
+extern crate actix_web;
extern crate futures;
+#[cfg(feature = "hyper")]
extern crate hyper;
extern crate ipfs_api;
@@ -46,5 +49,13 @@ fn main() {
.map(|commands| print_recursive(0, &commands))
.map_err(|e| eprintln!("{}", e));
+ #[cfg(feature = "hyper")]
hyper::rt::run(req);
+ #[cfg(feature = "actix")]
+ actix_web::actix::run(|| {
+ req.then(|_| {
+ actix_web::actix::System::current().stop();
+ Ok(())
+ })
+ });
}