summaryrefslogtreecommitdiffstats
path: root/ipfs-api/examples/get_swarm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ipfs-api/examples/get_swarm.rs')
-rw-r--r--ipfs-api/examples/get_swarm.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipfs-api/examples/get_swarm.rs b/ipfs-api/examples/get_swarm.rs
index 60c8290..67dc70b 100644
--- a/ipfs-api/examples/get_swarm.rs
+++ b/ipfs-api/examples/get_swarm.rs
@@ -11,7 +11,8 @@ use ipfs_api::IpfsClient;
// Creates an Ipfs client, and gets information about your local address, and
// connected peers.
//
-#[tokio::main]
+#[cfg_attr(feature = "actix", actix_rt::main)]
+#[cfg_attr(feature = "hyper", tokio::main)]
async fn main() {
eprintln!("connecting to localhost:5001...");