From 25663d67b8b2eb0f0d873e5f908a91aac539ced2 Mon Sep 17 00:00:00 2001 From: umgefahren <55623006+umgefahren@users.noreply.github.com> Date: Fri, 25 Nov 2022 17:41:43 +0100 Subject: [PATCH 1/6] Removed previously deprecated functions --- swarm/src/lib.rs | 53 ------------------------------------------------ 1 file changed, 53 deletions(-) diff --git a/swarm/src/lib.rs b/swarm/src/lib.rs index 0c5cadcf021..7e5a607feda 100644 --- a/swarm/src/lib.rs +++ b/swarm/src/lib.rs @@ -342,19 +342,6 @@ impl Swarm where TBehaviour: NetworkBehaviour, { - /// Builds a new `Swarm`. - #[deprecated( - since = "0.41.0", - note = "This constructor is considered ambiguous regarding the executor. Use one of the new, executor-specific constructors or `Swarm::with_threadpool_executor` for the same behaviour." - )] - pub fn new( - transport: transport::Boxed<(PeerId, StreamMuxerBox)>, - behaviour: TBehaviour, - local_peer_id: PeerId, - ) -> Self { - Self::with_threadpool_executor(transport, behaviour, local_peer_id) - } - /// Builds a new `Swarm` with a provided executor. pub fn with_executor( transport: transport::Boxed<(PeerId, StreamMuxerBox)>, @@ -1432,35 +1419,6 @@ impl SwarmBuilder where TBehaviour: NetworkBehaviour, { - /// Creates a new `SwarmBuilder` from the given transport, behaviour and - /// local peer ID. The `Swarm` with its underlying `Network` is obtained - /// via [`SwarmBuilder::build`]. - #[deprecated( - since = "0.41.0", - note = "Use `SwarmBuilder::with_executor` or `SwarmBuilder::without_executor` instead." - )] - pub fn new( - transport: transport::Boxed<(PeerId, StreamMuxerBox)>, - behaviour: TBehaviour, - local_peer_id: PeerId, - ) -> Self { - let executor: Option> = match ThreadPoolBuilder::new() - .name_prefix("libp2p-swarm-task-") - .create() - .ok() - { - Some(tp) => Some(Box::new(tp)), - None => None, - }; - SwarmBuilder { - local_peer_id, - transport, - behaviour, - pool_config: PoolConfig::new(executor), - connection_limits: Default::default(), - } - } - /// Creates a new [`SwarmBuilder`] from the given transport, behaviour, local peer ID and /// executor. The `Swarm` with its underlying `Network` is obtained via /// [`SwarmBuilder::build`]. @@ -1538,17 +1496,6 @@ where } } - /// Configures the `Executor` to use for spawning background tasks. - /// - /// By default, unless another executor has been configured, - /// [`SwarmBuilder::build`] will try to set up a - /// [`ThreadPool`](futures::executor::ThreadPool). - #[deprecated(since = "0.41.0", note = "Use `SwarmBuilder::with_executor` instead.")] - pub fn executor(mut self, executor: Box) -> Self { - self.pool_config = self.pool_config.with_executor(executor); - self - } - /// Configures the number of events from the [`NetworkBehaviour`] in /// destination to the [`ConnectionHandler`] that can be buffered before /// the [`Swarm`] has to wait. An individual buffer with this number of From f7ec433e4d02db7982156c997bc91b51a167d63a Mon Sep 17 00:00:00 2001 From: umgefahren <55623006+umgefahren@users.noreply.github.com> Date: Tue, 29 Nov 2022 12:25:16 +0100 Subject: [PATCH 2/6] Removed now unused functions --- swarm/src/connection/pool.rs | 6 ------ swarm/src/executor.rs | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/swarm/src/connection/pool.rs b/swarm/src/connection/pool.rs index 8729b2e36e1..744f57bcda9 100644 --- a/swarm/src/connection/pool.rs +++ b/swarm/src/connection/pool.rs @@ -1102,12 +1102,6 @@ impl PoolConfig { } } - /// Configures the executor to use for spawning connection background tasks. - pub fn with_executor(mut self, executor: Box) -> Self { - self.executor = Some(executor); - self - } - /// Sets the maximum number of events sent to a connection's background task /// that may be buffered, if the task cannot keep up with their consumption and /// delivery to the connection handler. diff --git a/swarm/src/executor.rs b/swarm/src/executor.rs index ab7ab6b1fdf..d4b97a1d8b8 100644 --- a/swarm/src/executor.rs +++ b/swarm/src/executor.rs @@ -39,7 +39,7 @@ pub struct TokioExecutor; ))] impl Executor for TokioExecutor { fn exec(&self, future: Pin + Send>>) { - let _ = tokio::spawn(future); + tokio::spawn(future); } } @@ -56,7 +56,7 @@ pub struct AsyncStdExecutor; ))] impl Executor for AsyncStdExecutor { fn exec(&self, future: Pin + Send>>) { - let _ = async_std::task::spawn(future); + async_std::task::spawn(future); } } From c58731938792a3dd363f533fa4f9e2256084282f Mon Sep 17 00:00:00 2001 From: umgefahren <55623006+umgefahren@users.noreply.github.com> Date: Tue, 6 Dec 2022 14:52:51 +0100 Subject: [PATCH 3/6] Fixed failing CI --- protocols/gossipsub/src/lib.rs | 4 ++-- src/tutorials/ping.rs | 4 ++-- swarm/src/behaviour.rs | 2 +- swarm/src/lib.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/protocols/gossipsub/src/lib.rs b/protocols/gossipsub/src/lib.rs index f01b952cb72..faf0b050590 100644 --- a/protocols/gossipsub/src/lib.rs +++ b/protocols/gossipsub/src/lib.rs @@ -121,8 +121,8 @@ //! libp2p_gossipsub::Gossipsub::new(message_authenticity, gossipsub_config).unwrap(); //! // subscribe to the topic //! gossipsub.subscribe(&topic); -//! // create the swarm -//! libp2p_swarm::Swarm::new( +//! // create the swarm (use an executor in a real example) +//! libp2p_swarm::Swarm::without_executor( //! transport, //! gossipsub, //! local_peer_id, diff --git a/src/tutorials/ping.rs b/src/tutorials/ping.rs index ce982861d06..e269d399c81 100644 --- a/src/tutorials/ping.rs +++ b/src/tutorials/ping.rs @@ -193,7 +193,7 @@ //! // can be observed. //! let behaviour = ping::Behaviour::new(ping::Config::new().with_keep_alive(true)); //! -//! let mut swarm = Swarm::new(transport, behaviour, local_peer_id); +//! let mut swarm = Swarm::with_async_std_executor(transport, behaviour, local_peer_id); //! //! Ok(()) //! } @@ -290,7 +290,7 @@ //! // can be observed. //! let behaviour = ping::Behaviour::new(ping::Config::new().with_keep_alive(true)); //! -//! let mut swarm = Swarm::new(transport, behaviour, local_peer_id); +//! let mut swarm = Swarm::with_async_std_executor(transport, behaviour, local_peer_id); //! //! // Tell the swarm to listen on all interfaces and a random, OS-assigned //! // port. diff --git a/swarm/src/behaviour.rs b/swarm/src/behaviour.rs index 6240e570888..cbd2a4381c4 100644 --- a/swarm/src/behaviour.rs +++ b/swarm/src/behaviour.rs @@ -471,7 +471,7 @@ pub enum NetworkBehaviourAction< /// # .multiplex(yamux::YamuxConfig::default()) /// # .boxed(); /// # - /// # let mut swarm = Swarm::new(transport, MyBehaviour::default(), local_peer_id); + /// # let mut swarm = Swarm::with_threadpool_executor(transport, MyBehaviour::default(), local_peer_id); /// # /// // Super precious message that we should better not lose. /// let message = PreciousMessage("My precious message".to_string()); diff --git a/swarm/src/lib.rs b/swarm/src/lib.rs index 7e5a607feda..af49f1fdd70 100644 --- a/swarm/src/lib.rs +++ b/swarm/src/lib.rs @@ -485,7 +485,7 @@ where /// # use libp2p_core::transport::dummy::DummyTransport; /// # use libp2p_swarm::dummy; /// # - /// let mut swarm = Swarm::new( + /// let mut swarm = Swarm::without_executor( /// DummyTransport::new().boxed(), /// dummy::Behaviour, /// PeerId::random(), From 035b5c3ea2da1841a9bd62f7fb91788d3627ff1f Mon Sep 17 00:00:00 2001 From: umgefahren <55623006+umgefahren@users.noreply.github.com> Date: Fri, 9 Dec 2022 11:34:40 +0100 Subject: [PATCH 4/6] Added CHANGELOG entry --- swarm/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/swarm/CHANGELOG.md b/swarm/CHANGELOG.md index 28504e85bde..7dfbb62615e 100644 --- a/swarm/CHANGELOG.md +++ b/swarm/CHANGELOG.md @@ -1,3 +1,9 @@ +# 0.42.0 [unreleased] + +- Removed deprecated Swarm constructors. For transition notes see [0.41.0](#0.41.0). See [PR 3170]. + +[PR 3170]: https://github.com/libp2p/rust-libp2p/pull/3170 + # 0.41.1 - Update to `libp2p-swarm-derive` `v0.31.0`. From b1ab84cf4b80f4ef19d7a637bcd8d93691ef7b40 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 9 Dec 2022 12:46:29 +0100 Subject: [PATCH 5/6] chore: Bump libp2p and libp2p-swarm version --- CHANGELOG.md | 5 +++++ Cargo.toml | 4 ++-- misc/metrics/Cargo.toml | 4 ++-- protocols/autonat/Cargo.toml | 4 ++-- protocols/dcutr/Cargo.toml | 4 ++-- protocols/floodsub/Cargo.toml | 4 ++-- protocols/gossipsub/Cargo.toml | 4 ++-- protocols/identify/Cargo.toml | 4 ++-- protocols/kad/Cargo.toml | 4 ++-- protocols/mdns/Cargo.toml | 4 ++-- protocols/ping/Cargo.toml | 4 ++-- protocols/relay/Cargo.toml | 4 ++-- protocols/rendezvous/Cargo.toml | 4 ++-- protocols/request-response/Cargo.toml | 4 ++-- swarm/Cargo.toml | 2 +- 15 files changed, 32 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 966b2da7d0d..c9db1151f7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,11 @@ # `libp2p` facade crate +# 0.51.0 [unreleased] + +- Update individual crates. + - Update to [`libp2p-swarm` `v0.42.0`](swarm/CHANGELOG.md#0420). + # 0.50.0 This is a large release. After > 4 years, rust-libp2p ships with an [(alpha) QUIC diff --git a/Cargo.toml b/Cargo.toml index 726a717a810..6ebcf2d45c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p" edition = "2021" rust-version = "1.62.0" description = "Peer-to-peer networking library" -version = "0.50.0" +version = "0.51.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" @@ -107,7 +107,7 @@ libp2p-pnet = { version = "0.22.2", path = "transports/pnet", optional = true } libp2p-relay = { version = "0.14.0", path = "protocols/relay", optional = true } libp2p-rendezvous = { version = "0.11.0", path = "protocols/rendezvous", optional = true } libp2p-request-response = { version = "0.23.0", path = "protocols/request-response", optional = true } -libp2p-swarm = { version = "0.41.0", path = "swarm" } +libp2p-swarm = { version = "0.42.0", path = "swarm" } libp2p-uds = { version = "0.37.0", path = "transports/uds", optional = true } libp2p-wasm-ext = { version = "0.38.0", path = "transports/wasm-ext", optional = true } libp2p-yamux = { version = "0.42.0", path = "muxers/yamux", optional = true } diff --git a/misc/metrics/Cargo.toml b/misc/metrics/Cargo.toml index 0505a856cc4..5ad5cdc7071 100644 --- a/misc/metrics/Cargo.toml +++ b/misc/metrics/Cargo.toml @@ -25,7 +25,7 @@ libp2p-identify = { version = "0.41.0", path = "../../protocols/identify", optio libp2p-kad = { version = "0.42.0", path = "../../protocols/kad", optional = true } libp2p-ping = { version = "0.41.0", path = "../../protocols/ping", optional = true } libp2p-relay = { version = "0.14.0", path = "../../protocols/relay", optional = true } -libp2p-swarm = { version = "0.41.0", path = "../../swarm" } +libp2p-swarm = { version = "0.42.0", path = "../../swarm" } prometheus-client = "0.18.0" [target.'cfg(not(target_os = "unknown"))'.dependencies] @@ -39,7 +39,7 @@ libp2p = { path = "../..", features = ["full"] } hyper = { version="0.14", features = ["server", "tcp", "http1"] } tokio = { version = "1", features = ["rt-multi-thread"] } -# Passing arguments to the docsrs builder in order to properly document cfg's. +# Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling [package.metadata.docs.rs] all-features = true diff --git a/protocols/autonat/Cargo.toml b/protocols/autonat/Cargo.toml index 02a9df864c6..62cacce720e 100644 --- a/protocols/autonat/Cargo.toml +++ b/protocols/autonat/Cargo.toml @@ -19,7 +19,7 @@ futures = "0.3" futures-timer = "3.0" instant = "0.1" libp2p-core = { version = "0.38.0", path = "../../core" } -libp2p-swarm = { version = "0.41.0", path = "../../swarm" } +libp2p-swarm = { version = "0.42.0", path = "../../swarm" } libp2p-request-response = { version = "0.23.0", path = "../request-response" } log = "0.4" rand = "0.8" @@ -31,7 +31,7 @@ env_logger = "0.10" clap = { version = "4.0.13", features = ["derive"] } libp2p = { path = "../..", features = ["full"] } -# Passing arguments to the docsrs builder in order to properly document cfg's. +# Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling [package.metadata.docs.rs] all-features = true diff --git a/protocols/dcutr/Cargo.toml b/protocols/dcutr/Cargo.toml index 3046e66fbc1..53a5a33f245 100644 --- a/protocols/dcutr/Cargo.toml +++ b/protocols/dcutr/Cargo.toml @@ -18,7 +18,7 @@ futures = "0.3.1" futures-timer = "3.0" instant = "0.1.11" libp2p-core = { version = "0.38.0", path = "../../core" } -libp2p-swarm = { version = "0.41.0", path = "../../swarm" } +libp2p-swarm = { version = "0.42.0", path = "../../swarm" } log = "0.4" prost-codec = { version = "0.3", path = "../../misc/prost-codec" } prost = "0.11" @@ -34,7 +34,7 @@ libp2p = { path = "../..", features = ["full"] } rand = "0.8" clap = { version = "4.0.13", features = ["derive"] } -# Passing arguments to the docsrs builder in order to properly document cfg's. +# Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling [package.metadata.docs.rs] all-features = true diff --git a/protocols/floodsub/Cargo.toml b/protocols/floodsub/Cargo.toml index 70731cd3eea..5f9f39da0b7 100644 --- a/protocols/floodsub/Cargo.toml +++ b/protocols/floodsub/Cargo.toml @@ -15,7 +15,7 @@ cuckoofilter = "0.5.0" fnv = "1.0" futures = "0.3.1" libp2p-core = { version = "0.38.0", path = "../../core" } -libp2p-swarm = { version = "0.41.0", path = "../../swarm" } +libp2p-swarm = { version = "0.42.0", path = "../../swarm" } log = "0.4" prost = "0.11" rand = "0.8" @@ -25,7 +25,7 @@ thiserror = "1.0.37" [build-dependencies] prost-build = "0.11" -# Passing arguments to the docsrs builder in order to properly document cfg's. +# Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling [package.metadata.docs.rs] all-features = true diff --git a/protocols/gossipsub/Cargo.toml b/protocols/gossipsub/Cargo.toml index 64a6c22990d..3ef3be62e7f 100644 --- a/protocols/gossipsub/Cargo.toml +++ b/protocols/gossipsub/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -libp2p-swarm = { version = "0.41.0", path = "../../swarm" } +libp2p-swarm = { version = "0.42.0", path = "../../swarm" } libp2p-core = { version = "0.38.0", path = "../../core" } bytes = "1.0" byteorder = "1.3.4" @@ -46,7 +46,7 @@ derive_builder = "0.11.1" [build-dependencies] prost-build = "0.11" -# Passing arguments to the docsrs builder in order to properly document cfg's. +# Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling [package.metadata.docs.rs] all-features = true diff --git a/protocols/identify/Cargo.toml b/protocols/identify/Cargo.toml index a4be5e7f2d9..472a1fb86a8 100644 --- a/protocols/identify/Cargo.toml +++ b/protocols/identify/Cargo.toml @@ -15,7 +15,7 @@ asynchronous-codec = "0.6" futures = "0.3.1" futures-timer = "3.0.2" libp2p-core = { version = "0.38.0", path = "../../core" } -libp2p-swarm = { version = "0.41.0", path = "../../swarm" } +libp2p-swarm = { version = "0.42.0", path = "../../swarm" } log = "0.4.1" lru = "0.8.0" prost-codec = { version = "0.3", path = "../../misc/prost-codec" } @@ -32,7 +32,7 @@ libp2p = { path = "../..", features = ["full"] } [build-dependencies] prost-build = "0.11" -# Passing arguments to the docsrs builder in order to properly document cfg's. +# Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling [package.metadata.docs.rs] all-features = true diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index b27ec20a917..94e1eb5c3ab 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -19,7 +19,7 @@ asynchronous-codec = "0.6" futures = "0.3.1" log = "0.4" libp2p-core = { version = "0.38.0", path = "../../core" } -libp2p-swarm = { version = "0.41.0", path = "../../swarm" } +libp2p-swarm = { version = "0.42.0", path = "../../swarm" } prost = "0.11" rand = "0.8" sha2 = "0.10.0" @@ -44,7 +44,7 @@ prost-build = "0.11" [features] serde = ["dep:serde", "bytes/serde"] -# Passing arguments to the docsrs builder in order to properly document cfg's. +# Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling [package.metadata.docs.rs] all-features = true diff --git a/protocols/mdns/Cargo.toml b/protocols/mdns/Cargo.toml index 8aa4ba6e0ba..02136291569 100644 --- a/protocols/mdns/Cargo.toml +++ b/protocols/mdns/Cargo.toml @@ -16,7 +16,7 @@ data-encoding = "2.3.2" futures = "0.3.13" if-watch = "3.0.0" libp2p-core = { version = "0.38.0", path = "../../core" } -libp2p-swarm = { version = "0.41.0", path = "../../swarm" } +libp2p-swarm = { version = "0.42.0", path = "../../swarm" } log = "0.4.14" rand = "0.8.3" smallvec = "1.6.1" @@ -45,7 +45,7 @@ name = "use-tokio" required-features = ["tokio"] -# Passing arguments to the docsrs builder in order to properly document cfg's. +# Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling [package.metadata.docs.rs] all-features = true diff --git a/protocols/ping/Cargo.toml b/protocols/ping/Cargo.toml index b03cc6e765f..d6e9612ac87 100644 --- a/protocols/ping/Cargo.toml +++ b/protocols/ping/Cargo.toml @@ -15,7 +15,7 @@ futures = "0.3.1" futures-timer = "3.0.2" instant = "0.1.11" libp2p-core = { version = "0.38.0", path = "../../core" } -libp2p-swarm = { version = "0.41.0", path = "../../swarm" } +libp2p-swarm = { version = "0.42.0", path = "../../swarm" } log = "0.4.1" rand = "0.8" void = "1.0" @@ -25,7 +25,7 @@ async-std = "1.6.2" libp2p = { path = "../..", features = ["full"] } quickcheck = { package = "quickcheck-ext", path = "../../misc/quickcheck-ext" } -# Passing arguments to the docsrs builder in order to properly document cfg's. +# Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling [package.metadata.docs.rs] all-features = true diff --git a/protocols/relay/Cargo.toml b/protocols/relay/Cargo.toml index d988358aa02..eed6116f23d 100644 --- a/protocols/relay/Cargo.toml +++ b/protocols/relay/Cargo.toml @@ -18,7 +18,7 @@ futures = "0.3.1" futures-timer = "3" instant = "0.1.11" libp2p-core = { version = "0.38.0", path = "../../core" } -libp2p-swarm = { version = "0.41.0", path = "../../swarm" } +libp2p-swarm = { version = "0.42.0", path = "../../swarm" } log = "0.4" pin-project = "1" prost-codec = { version = "0.3", path = "../../misc/prost-codec" } @@ -38,7 +38,7 @@ libp2p = { path = "../..", features = ["full"] } quickcheck = { package = "quickcheck-ext", path = "../../misc/quickcheck-ext" } clap = { version = "4.0.13", features = ["derive"] } -# Passing arguments to the docsrs builder in order to properly document cfg's. +# Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling [package.metadata.docs.rs] all-features = true diff --git a/protocols/rendezvous/Cargo.toml b/protocols/rendezvous/Cargo.toml index 02867ab5f53..95329940b06 100644 --- a/protocols/rendezvous/Cargo.toml +++ b/protocols/rendezvous/Cargo.toml @@ -17,7 +17,7 @@ futures = { version = "0.3", default-features = false, features = ["std"] } futures-timer = "3.0.2" instant = "0.1.11" libp2p-core = { version = "0.38.0", path = "../../core" } -libp2p-swarm = { version = "0.41.0", path = "../../swarm" } +libp2p-swarm = { version = "0.42.0", path = "../../swarm" } log = "0.4" prost = "0.11" prost-codec = { version = "0.3.0", path = "../../misc/prost-codec" } @@ -37,7 +37,7 @@ tokio = { version = "1.15", features = [ "rt-multi-thread", "time", "macros", "s [build-dependencies] prost-build = "0.11" -# Passing arguments to the docsrs builder in order to properly document cfg's. +# Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling [package.metadata.docs.rs] all-features = true diff --git a/protocols/request-response/Cargo.toml b/protocols/request-response/Cargo.toml index 544d8154cb1..cf8d3d1b1ea 100644 --- a/protocols/request-response/Cargo.toml +++ b/protocols/request-response/Cargo.toml @@ -16,7 +16,7 @@ bytes = "1" futures = "0.3.1" instant = "0.1.11" libp2p-core = { version = "0.38.0", path = "../../core" } -libp2p-swarm = { version = "0.41.0", path = "../../swarm" } +libp2p-swarm = { version = "0.42.0", path = "../../swarm" } log = "0.4.11" rand = "0.8" smallvec = "1.6.1" @@ -28,7 +28,7 @@ env_logger = "0.10.0" libp2p = { path = "../..", features = ["full"] } rand = "0.8" -# Passing arguments to the docsrs builder in order to properly document cfg's. +# Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling [package.metadata.docs.rs] all-features = true diff --git a/swarm/Cargo.toml b/swarm/Cargo.toml index 890bf485595..91a5c2c45ad 100644 --- a/swarm/Cargo.toml +++ b/swarm/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-swarm" edition = "2021" rust-version = "1.62.0" description = "The libp2p swarm" -version = "0.41.1" +version = "0.42.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" From e40e6e25fe744025eae792363fdbf0c519306035 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 9 Dec 2022 14:58:32 +0100 Subject: [PATCH 6/6] src/tutorials: Replace Swarm::new --- src/tutorials/ping.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tutorials/ping.rs b/src/tutorials/ping.rs index e269d399c81..167c7d7907e 100644 --- a/src/tutorials/ping.rs +++ b/src/tutorials/ping.rs @@ -245,7 +245,7 @@ //! // can be observed. //! let behaviour = ping::Behaviour::new(ping::Config::new().with_keep_alive(true)); //! -//! let mut swarm = Swarm::new(transport, behaviour, local_peer_id); +//! let mut swarm = Swarm::with_async_std_executor(transport, behaviour, local_peer_id); //! //! // Tell the swarm to listen on all interfaces and a random, OS-assigned //! // port.