diff --git a/Cargo.lock b/Cargo.lock index f858c2e53bc..aa8ad584ade 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2724,7 +2724,7 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.45.0" +version = "0.45.1" dependencies = [ "arrayvec", "async-std", diff --git a/Cargo.toml b/Cargo.toml index 89790baf82e..a1a40a0d749 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -82,7 +82,7 @@ libp2p-floodsub = { version = "0.44.0", path = "protocols/floodsub" } libp2p-gossipsub = { version = "0.46.0", path = "protocols/gossipsub" } libp2p-identify = { version = "0.44.0", path = "protocols/identify" } libp2p-identity = { version = "0.2.7" } -libp2p-kad = { version = "0.45.0", path = "protocols/kad" } +libp2p-kad = { version = "0.45.1", path = "protocols/kad" } libp2p-mdns = { version = "0.45.0", path = "protocols/mdns" } libp2p-memory-connection-limits = { version = "0.2.0", path = "misc/memory-connection-limits" } libp2p-metrics = { version = "0.14.0", path = "misc/metrics" } diff --git a/protocols/kad/CHANGELOG.md b/protocols/kad/CHANGELOG.md index 842204cbef2..c2d117b244c 100644 --- a/protocols/kad/CHANGELOG.md +++ b/protocols/kad/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.45.1 - unreleased + +- Add `std::fmt::Display` implementation on `QueryId`. + See [PR 4814](https://github.com/libp2p/rust-libp2p/pull/4814). + ## 0.45.0 - Remove deprecated `kad::Config::set_connection_idle_timeout` in favor of `SwarmBuilder::idle_connection_timeout`. diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index 9410ff0eebe..51e9656441f 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-kad" edition = "2021" rust-version = { workspace = true } description = "Kademlia protocol for libp2p" -version = "0.45.0" +version = "0.45.1" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/kad/src/query.rs b/protocols/kad/src/query.rs index 20faff7721c..bb240d5864a 100644 --- a/protocols/kad/src/query.rs +++ b/protocols/kad/src/query.rs @@ -225,6 +225,12 @@ impl QueryPool { #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub struct QueryId(usize); +impl std::fmt::Display for QueryId { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.0) + } +} + /// The configuration for queries in a `QueryPool`. #[derive(Debug, Clone)] pub(crate) struct QueryConfig {