Skip to content

Commit bffe415

Browse files
fix(dcutr): rename error types to bypass cargo-semver-checks hickup (#3213)
`cargo semver-checks` is still missing features in regards to properly detecting renamed exports. To make our CI pass again, we remove the renamed export, replace it with type-aliases and deprecate them to point users types exported under a module which now follows the conventions set in #2217.
1 parent 7dedc35 commit bffe415

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

protocols/dcutr/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
- Update to `libp2p-swarm` `v0.42.0`.
44

5+
- Declare `InboundUpgradeError` and `OutboundUpgradeError` as type aliases instead of renames.
6+
This is a workaround for a missing feature in `cargo semver-checks`. See [PR 3213].
7+
8+
[PR 3213]: https://github.com/libp2p/rust-libp2p/pull/3213
9+
510
# 0.8.0
611

712
- Update to `prost-codec` `v0.3.0`.

protocols/dcutr/src/lib.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@
2626
pub mod behaviour;
2727
mod handler;
2828
mod protocol;
29-
30-
pub use protocol::{
31-
inbound::UpgradeError as InboundUpgradeError, outbound::UpgradeError as OutboundUpgradeError,
32-
PROTOCOL_NAME,
33-
};
34-
3529
#[allow(clippy::derive_partial_eq_without_eq)]
3630
mod message_proto {
3731
include!(concat!(env!("OUT_DIR"), "/holepunch.pb.rs"));
3832
}
33+
34+
pub use protocol::PROTOCOL_NAME;
35+
pub type InboundUpgradeError = protocol::inbound::UpgradeError;
36+
pub type OutboundUpgradeError = protocol::outbound::UpgradeError;

0 commit comments

Comments
 (0)