From 38beeefc586a4834fa8896920effd1557714008d Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Mon, 24 Oct 2022 10:51:58 +0200 Subject: [PATCH] Missing custom Display implementation on error (#2902) Right now the `derive_more` library just prints the value of `notifications_protocol_index` (an integer) when displaying this error, which is kind of crappy. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- src/libp2p/peers.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libp2p/peers.rs b/src/libp2p/peers.rs index 7312e6874b..6df9ce7218 100644 --- a/src/libp2p/peers.rs +++ b/src/libp2p/peers.rs @@ -2129,6 +2129,7 @@ pub enum InboundError { Connection(collection::InboundError), /// Refused a notifications substream because we already have an existing substream of that /// protocol. + #[display(fmt = "Refused duplicate notifications substream")] DuplicateNotificationsSubstream { /// Notifications protocol the substream is about. notifications_protocol_index: usize,