diff options
Diffstat (limited to 'ipfs-api/examples/replace_config.rs')
-rw-r--r-- | ipfs-api/examples/replace_config.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ipfs-api/examples/replace_config.rs b/ipfs-api/examples/replace_config.rs index f354386..9c1ec61 100644 --- a/ipfs-api/examples/replace_config.rs +++ b/ipfs-api/examples/replace_config.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; @@ -27,5 +30,13 @@ fn main() { .map(|_| println!("replaced file")) .map_err(|e| println!("{}", e)); + #[cfg(feature = "hyper")] hyper::rt::run(req); + #[cfg(feature = "actix")] + actix_web::actix::run(|| { + req.then(|_| { + actix_web::actix::System::current().stop(); + Ok(()) + }) + }); } |