Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swarm-derive/lib: Don't clone error on inject_dial_failure #2349

Merged
merged 2 commits into from
Nov 18, 2021

Conversation

elenaf9
Copy link
Contributor

@elenaf9 elenaf9 commented Nov 18, 2021

NetworkBehaviour::inject_dial_failure expects a reference for the error, thus the error should not be cloned when passing it to the inner behaviours in the NetworkBehaviour derivation.

Fixes Issue #2348.

@mxinden do I need to add a Changelog entry for this?

@mxinden
Copy link
Member

mxinden commented Nov 18, 2021

@mxinden do I need to add a Changelog entry for this?

Yes. Please include the diff below, as otherwise, this won't make it into the next release:

diff --git a/CHANGELOG.md b/CHANGELOG.md
index facbdef0..c3112024 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -42,6 +42,11 @@
 
 # `libp2p` facade crate
 
+## Version 0.41.1 [unreleased]
+
+- Update individual crates.
+    - `libp2p-swarm-derive`
+
 ## Version 0.41.0 [2021-11-16]
 
 - Update individual crates.
diff --git a/Cargo.toml b/Cargo.toml
index a8d93817..7a013d18 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,7 +2,7 @@
 name = "libp2p"
 edition = "2018"
 description = "Peer-to-peer networking library"
-version = "0.41.0"
+version = "0.41.1"
 authors = ["Parity Technologies <admin@parity.io>"]
 license = "MIT"
 repository = "https://github.com/libp2p/rust-libp2p"
@@ -86,7 +86,7 @@ libp2p-relay = { version = "0.5.0", path = "protocols/relay", optional = true }
 libp2p-rendezvous = { version = "0.2.0", path = "protocols/rendezvous", optional = true }
 libp2p-request-response = { version = "0.14.0", path = "protocols/request-response", optional = true }
 libp2p-swarm = { version = "0.32.0", path = "swarm" }
-libp2p-swarm-derive = { version = "0.26.0", path = "swarm-derive" }
+libp2p-swarm-derive = { version = "0.26.1", path = "swarm-derive" }
 libp2p-uds = { version = "0.30.0", path = "transports/uds", optional = true }
 libp2p-wasm-ext = { version = "0.30.0", path = "transports/wasm-ext", default-features = false, optional = true }
 libp2p-yamux = { version = "0.34.0", path = "muxers/yamux", optional = true }
diff --git a/swarm-derive/CHANGELOG.md b/swarm-derive/CHANGELOG.md
index a474845f..18e1eaf7 100644
--- a/swarm-derive/CHANGELOG.md
+++ b/swarm-derive/CHANGELOG.md
@@ -1,3 +1,9 @@
+# 0.26.1 [unreleased]
+
+- Remove unnecessary clone of error in `inject_dial_failure` (see [PR 2349]).
+
+[PR 2349]: https://github.com/libp2p/rust-libp2p/pull/2349
+
 # 0.26.0 [2021-11-16]
 
 - Adjust to advanced dialing requests API changes (see [PR 2317]).
diff --git a/swarm-derive/Cargo.toml b/swarm-derive/Cargo.toml
index 01ca2087..3c06a853 100644
--- a/swarm-derive/Cargo.toml
+++ b/swarm-derive/Cargo.toml
@@ -2,7 +2,7 @@
 name = "libp2p-swarm-derive"
 edition = "2018"
 description = "Procedural macros of libp2p-core"
-version = "0.26.0"
+version = "0.26.1"
 authors = ["Parity Technologies <admin@parity.io>"]
 license = "MIT"
 repository = "https://github.com/libp2p/rust-libp2p"

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏 Thank you Elena!

@mxinden mxinden changed the title swarm-derive/lib: don't clone error on inject_dial_failure swarm-derive/lib: Don't clone error on inject_dial_failure Nov 18, 2021
@mxinden mxinden merged commit 17d6b4b into libp2p:master Nov 18, 2021
@elenaf9 elenaf9 deleted the swarm-derive/inject-dial-error branch November 18, 2021 12:23
@jnicholls
Copy link

jnicholls commented Jan 4, 2022

Do we have an ETA on when 0.41.1 or the current 0.42.0 will be released with this fix? Thanks in advance!

@mxinden
Copy link
Member

mxinden commented Jan 12, 2022

@jnicholls I plan to cut v0.42.0 next week. Is that good enough for you?

@jnicholls
Copy link

@mxinden You and other contributors are kicking butt on this OSS project; I expect nothing and fully appreciate and am grateful for everyone's efforts! I would be content if you said next year :) But next week is awesome news, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants