From 6430c7631a2efc497fc14595739b90e20957d293 Mon Sep 17 00:00:00 2001 From: Ferris Tseng Date: Sun, 4 Apr 2021 18:51:03 -0400 Subject: update examples --- ipfs-api-examples/Cargo.toml | 8 +++----- ipfs-api-examples/examples/pubsub.rs | 6 ++---- ipfs-api-examples/src/lib.rs | 6 ------ 3 files changed, 5 insertions(+), 15 deletions(-) (limited to 'ipfs-api-examples') diff --git a/ipfs-api-examples/Cargo.toml b/ipfs-api-examples/Cargo.toml index d8c117e..9e928eb 100644 --- a/ipfs-api-examples/Cargo.toml +++ b/ipfs-api-examples/Cargo.toml @@ -12,9 +12,8 @@ readme = "../README.md" license = "MIT OR Apache-2.0" [features] -default = ["with-hyper"] -with-hyper = ["ipfs-api-backend-hyper", "tokio-hyper", "tokio-hyper/macros", "tokio-hyper/rt-multi-thread"] -with-actix = ["ipfs-api-backend-actix", "tokio-actix", "actix-rt"] +with-hyper = ["ipfs-api-backend-hyper", "tokio/macros", "tokio/rt-multi-thread"] +with-actix = ["ipfs-api-backend-actix", "actix-rt"] [dependencies] actix-rt = { version = "2.0", optional = true } @@ -22,7 +21,6 @@ futures = "0.3" ipfs-api-backend-actix = { version = "0.1", path = "../ipfs-api-backend-actix", optional = true } ipfs-api-backend-hyper = { version = "0.1", path = "../ipfs-api-backend-hyper", optional = true } tar = "0.4" -tokio-actix = { package = "tokio", version = "1.0", features = ["time"], optional = true } -tokio-hyper = { package = "tokio", version = "1.2", features = ["time"], optional = true } +tokio = { version = "1.2", features = ["time"] } tokio-stream = { version = "0.1", features = ["time"] } tracing-subscriber = { version = "0.2", features = ["fmt"] } diff --git a/ipfs-api-examples/examples/pubsub.rs b/ipfs-api-examples/examples/pubsub.rs index 0311ed7..8944f3c 100644 --- a/ipfs-api-examples/examples/pubsub.rs +++ b/ipfs-api-examples/examples/pubsub.rs @@ -7,11 +7,9 @@ // use futures::{future, select, FutureExt, StreamExt, TryStreamExt}; -use ipfs_api_examples::{ - ipfs_api::{IpfsApi, IpfsClient}, - tokio::time, -}; +use ipfs_api_examples::ipfs_api::{IpfsApi, IpfsClient}; use std::time::Duration; +use tokio::time; use tokio_stream::wrappers::IntervalStream; static TOPIC: &'static str = "test"; diff --git a/ipfs-api-examples/src/lib.rs b/ipfs-api-examples/src/lib.rs index b3e8c42..71d3fb5 100644 --- a/ipfs-api-examples/src/lib.rs +++ b/ipfs-api-examples/src/lib.rs @@ -12,14 +12,8 @@ pub use actix_rt::main; #[cfg(feature = "with-actix")] pub use ipfs_api_backend_actix as ipfs_api; -#[cfg(feature = "with-actix")] -pub use tokio_actix as tokio; // Compatibilty for actix-rt 1.0 - #[cfg(feature = "with-hyper")] pub use tokio::main; #[cfg(feature = "with-hyper")] pub use ipfs_api_backend_hyper as ipfs_api; - -#[cfg(feature = "with-hyper")] -pub use tokio_hyper as tokio; -- cgit v1.2.3