summaryrefslogtreecommitdiffstats
path: root/ipfs-api/examples/add_file.rs
diff options
context:
space:
mode:
authorFerris Tseng <ferris@navapbc.com>2019-12-24 17:52:16 -0500
committerFerris Tseng <ferris@navapbc.com>2019-12-24 17:52:16 -0500
commit25d6054562187a0d46049cc0bde49f82f0fc27a2 (patch)
treeaeccd876ff1e32b0e231abc332533718b90f9312 /ipfs-api/examples/add_file.rs
parent3aeb20d68f969216a127585a91eebede4911230f (diff)
use proper runtime for all examples
Diffstat (limited to 'ipfs-api/examples/add_file.rs')
-rw-r--r--ipfs-api/examples/add_file.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipfs-api/examples/add_file.rs b/ipfs-api/examples/add_file.rs
index 798a5f2..3015684 100644
--- a/ipfs-api/examples/add_file.rs
+++ b/ipfs-api/examples/add_file.rs
@@ -11,7 +11,8 @@ use std::fs::File;
// Creates an Ipfs client, and adds this source file to Ipfs.
//
-#[tokio::main]
+#[cfg_attr(feature = "actix", actix_rt::main)]
+#[cfg_attr(feature = "hyper", tokio::main)]
async fn main() {
eprintln!("note: this must be run in the root of the project repository");
eprintln!("connecting to localhost:5001...");