Skip to content

Commit

Permalink
feat(core): impl Display on ListenerId
Browse files Browse the repository at this point in the history
Fixes: #4935.

Pull-Request: #4936.
  • Loading branch information
stormshield-frb authored Dec 1, 2023
1 parent 9584ee3 commit a83c30a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ libp2p = { version = "0.53.0", path = "libp2p" }
libp2p-allow-block-list = { version = "0.3.0", path = "misc/allow-block-list" }
libp2p-autonat = { version = "0.12.0", path = "protocols/autonat" }
libp2p-connection-limits = { version = "0.3.0", path = "misc/connection-limits" }
libp2p-core = { version = "0.41.1", path = "core" }
libp2p-core = { version = "0.41.2", path = "core" }
libp2p-dcutr = { version = "0.11.0", path = "protocols/dcutr" }
libp2p-dns = { version = "0.41.1", path = "transports/dns" }
libp2p-floodsub = { version = "0.44.0", path = "protocols/floodsub" }
Expand Down
5 changes: 5 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.41.2

- Implement `std::fmt::Display` on `ListenerId`.
See [PR 4936](https://github.com/libp2p/rust-libp2p/pull/4936).

## 0.41.1

- Implement `{In,Out}boundConnectionUpgrade` for `SelectUpgrade`.
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libp2p-core"
edition = "2021"
rust-version = { workspace = true }
description = "Core traits and structs of libp2p"
version = "0.41.1"
version = "0.41.2"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand Down
6 changes: 6 additions & 0 deletions core/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ impl ListenerId {
}
}

impl std::fmt::Display for ListenerId {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.0)
}
}

/// Event produced by [`Transport`]s.
pub enum TransportEvent<TUpgr, TErr> {
/// A new address is being listened on.
Expand Down

0 comments on commit a83c30a

Please sign in to comment.