Skip to content

Commit 63313f4

Browse files
authored
chore(kad): remove unrequired generics
Remove the unrequired generics in `kad` and refactor the code for less duplication. Please review by commit order as it will be easier to understand each commit's rational and logic Pull-Request: libp2p#5476.
1 parent df59f4f commit 63313f4

File tree

9 files changed

+170
-214
lines changed

9 files changed

+170
-214
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ libp2p = { version = "0.54.0", path = "libp2p" }
7878
libp2p-allow-block-list = { version = "0.3.0", path = "misc/allow-block-list" }
7979
libp2p-autonat = { version = "0.12.1", path = "protocols/autonat" }
8080
libp2p-connection-limits = { version = "0.3.1", path = "misc/connection-limits" }
81-
libp2p-core = { version = "0.41.4", path = "core" }
81+
libp2p-core = { version = "0.41.3", path = "core" }
8282
libp2p-dcutr = { version = "0.11.1", path = "protocols/dcutr" }
8383
libp2p-dns = { version = "0.41.1", path = "transports/dns" }
8484
libp2p-floodsub = { version = "0.44.0", path = "protocols/floodsub" }

core/CHANGELOG.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
## 0.41.4
2-
- Add `PeerInfo` struct.
3-
See [PR 5475](https://github.com/libp2p/rust-libp2p/pull/5475)
4-
5-
## 0.41.3
1+
## 0.41.3
62
- Use `web-time` instead of `instant`.
73
See [PR 5347](https://github.com/libp2p/rust-libp2p/pull/5347).
84

core/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "libp2p-core"
33
edition = "2021"
44
rust-version = { workspace = true }
55
description = "Core traits and structs of libp2p"
6-
version = "0.41.4"
6+
version = "0.41.3"
77
authors = ["Parity Technologies <[email protected]>"]
88
license = "MIT"
99
repository = "https://github.com/libp2p/rust-libp2p"
@@ -35,8 +35,8 @@ void = "1"
3535

3636
[dev-dependencies]
3737
async-std = { version = "1.6.2", features = ["attributes"] }
38-
libp2p-mplex = { path = "../muxers/mplex" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
39-
libp2p-noise = { path = "../transports/noise" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
38+
libp2p-mplex = { path = "../muxers/mplex" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
39+
libp2p-noise = { path = "../transports/noise" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
4040
multihash = { workspace = true, features = ["arb"] }
4141
quickcheck = { workspace = true }
4242
libp2p-identity = { workspace = true, features = ["ed25519", "rand"] }

core/src/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,3 @@ pub use upgrade::{InboundUpgrade, OutboundUpgrade, UpgradeInfo};
6969
#[derive(Debug, thiserror::Error)]
7070
#[error(transparent)]
7171
pub struct DecodeError(quick_protobuf::Error);
72-
73-
/// Peer Info combines a Peer ID with a set of multiaddrs that the peer is listening on.
74-
#[derive(Debug, Clone, PartialEq, Eq)]
75-
pub struct PeerInfo {
76-
pub peer_id: PeerId,
77-
pub addrs: Vec<Multiaddr>,
78-
}

0 commit comments

Comments
 (0)