diff --git a/Cargo.lock b/Cargo.lock index 000122d44ad..e5e41d3bdf8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2778,7 +2778,7 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.45.2" +version = "0.46.0" dependencies = [ "async-std", "asynchronous-codec", diff --git a/Cargo.toml b/Cargo.toml index 0a981d73299..aab7f0d71d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,7 +84,7 @@ libp2p-dcutr = { version = "0.12.0", path = "protocols/dcutr" } libp2p-dns = { version = "0.42.0", path = "transports/dns" } libp2p-floodsub = { version = "0.45.0", path = "protocols/floodsub" } libp2p-gossipsub = { version = "0.48.0", path = "protocols/gossipsub" } -libp2p-identify = { version = "0.45.2", path = "protocols/identify" } +libp2p-identify = { version = "0.46.0", path = "protocols/identify" } libp2p-identity = { version = "0.2.9" } libp2p-kad = { version = "0.47.0", path = "protocols/kad" } libp2p-mdns = { version = "0.46.0", path = "protocols/mdns" } diff --git a/protocols/identify/CHANGELOG.md b/protocols/identify/CHANGELOG.md index d02c0acf02c..9051c331bbc 100644 --- a/protocols/identify/CHANGELOG.md +++ b/protocols/identify/CHANGELOG.md @@ -1,6 +1,6 @@ -## 0.45.2 +## 0.46.0 -- Make `identify::Config` fields private and added getter functions. +- Make `identify::Config` fields private and add getter functions. See [PR 5663](https://github.com/libp2p/rust-libp2p/pull/5663). ## 0.45.1 diff --git a/protocols/identify/Cargo.toml b/protocols/identify/Cargo.toml index 178b8062f9e..13c43b6a71f 100644 --- a/protocols/identify/Cargo.toml +++ b/protocols/identify/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-identify" edition = "2021" rust-version = { workspace = true } description = "Nodes identification protocol for libp2p" -version = "0.45.2" +version = "0.46.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/identify/src/behaviour.rs b/protocols/identify/src/behaviour.rs index db6a91a9df4..1f82cd154e3 100644 --- a/protocols/identify/src/behaviour.rs +++ b/protocols/identify/src/behaviour.rs @@ -204,18 +204,18 @@ impl Config { } /// Get the protocol version of the Config. - pub fn protocol_version(&self) -> String { - self.protocol_version.clone() + pub fn protocol_version(&self) -> &str { + &self.protocol_version } /// Get the local public key of the Config. - pub fn local_public_key(&self) -> PublicKey { - self.local_public_key.clone() + pub fn local_public_key(&self) -> &PublicKey { + &self.local_public_key } /// Get the agent version of the Config. - pub fn agent_version(&self) -> String { - self.agent_version.clone() + pub fn agent_version(&self) -> &str { + &self.agent_version } /// Get the interval of the Config.