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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand Down Expand Up @@ -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 }
Expand Down
6 changes: 6 additions & 0 deletions swarm-derive/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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]).
Expand Down
2 changes: 1 addition & 1 deletion swarm-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand Down
4 changes: 2 additions & 2 deletions swarm-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,10 @@ fn build_struct(ast: &DeriveInput, data_struct: &DataStruct) -> TokenStream {

let inject = match field.ident {
Some(ref i) => {
quote! { self.#i.inject_dial_failure(peer_id, handler, error.clone()) }
quote! { self.#i.inject_dial_failure(peer_id, handler, error) }
}
None => {
quote! { self.#enum_n.inject_dial_failure(peer_id, handler, error.clone()) }
quote! { self.#enum_n.inject_dial_failure(peer_id, handler, error) }
}
};

Expand Down