summaryrefslogtreecommitdiffstats
path: root/ipfs-api/examples/ping_peer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ipfs-api/examples/ping_peer.rs')
-rw-r--r--ipfs-api/examples/ping_peer.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipfs-api/examples/ping_peer.rs b/ipfs-api/examples/ping_peer.rs
index b432ef6..2934c16 100644
--- a/ipfs-api/examples/ping_peer.rs
+++ b/ipfs-api/examples/ping_peer.rs
@@ -12,7 +12,8 @@ use ipfs_api::{response::PingResponse, IpfsClient};
// Creates an Ipfs client, discovers a connected peer, and pings it using the
// streaming Api, and by collecting it into a collection.
//
-#[tokio::main]
+#[cfg_attr(feature = "actix", actix_rt::main)]
+#[cfg_attr(feature = "hyper", tokio::main)]
async fn main() {
eprintln!("connecting to localhost:5001...");