Skip to content

Commit 1b6ffb1

Browse files
core/: Add Display implementation for DialError (#2473)
Co-authored-by: Frederik Baetens <[email protected]>
1 parent 3f4dbb1 commit 1b6ffb1

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
## Version 0.43.0 [unreleased]
4646

4747
- Update individual crates.
48+
- `libp2p-core`
4849
- `libp2p-gossipsub`
4950
- `libp2p-metrics`
5051

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ instant = "0.1.11" # Explicit dependency to be used in `wasm-bindgen` feature
7777
lazy_static = "1.2"
7878

7979
libp2p-autonat = { version = "0.1.0", path = "protocols/autonat", optional = true }
80-
libp2p-core = { version = "0.31.0", path = "core", default-features = false }
80+
libp2p-core = { version = "0.31.1", path = "core", default-features = false }
8181
libp2p-floodsub = { version = "0.33.0", path = "protocols/floodsub", optional = true }
8282
libp2p-gossipsub = { version = "0.36.0", path = "./protocols/gossipsub", optional = true }
8383
libp2p-identify = { version = "0.33.0", path = "protocols/identify", optional = true }

core/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 0.31.1 [unreleased]
2+
3+
- Implement `Display` on `DialError`. See [PR 2456].
4+
5+
[PR 2456]: https://github.com/libp2p/rust-libp2p/pull/2456
6+
17
# 0.31.0 [2022-01-27]
28

39
- Update dependencies.

core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "libp2p-core"
33
edition = "2021"
44
rust-version = "1.56.1"
55
description = "Core traits and structs of libp2p"
6-
version = "0.31.0"
6+
version = "0.31.1"
77
authors = ["Parity Technologies <[email protected]>"]
88
license = "MIT"
99
repository = "https://github.com/libp2p/rust-libp2p"

core/src/network.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,12 +572,16 @@ impl NetworkConfig {
572572
#[derive(Debug, Clone, Error)]
573573
pub enum DialError<THandler> {
574574
/// The dialing attempt is rejected because of a connection limit.
575+
#[error("The dialing attempt was rejected because of a connection limit: {limit}")]
575576
ConnectionLimit {
576577
limit: ConnectionLimit,
577578
handler: THandler,
578579
},
579580
/// The dialing attempt is rejected because the peer being dialed is the local peer.
581+
#[error("The dialing attempt was rejected because the peer being dialed is the local peer")]
580582
LocalPeerId { handler: THandler },
583+
/// The dialing attempt is rejected because the PeerId is invalid.
584+
#[error("The dialing attempt was rejected because a valid PeerId could not be constructed from: {multihash:?}")]
581585
InvalidPeerId {
582586
handler: THandler,
583587
multihash: Multihash,

0 commit comments

Comments
 (0)