From c84a0fb86b64ce9e264d83686662a73204137317 Mon Sep 17 00:00:00 2001 From: Roland Kuhn Date: Thu, 20 Oct 2022 00:46:23 +0100 Subject: [PATCH] swarm: Improve rendering of `ConnectionLimit` error (#3043) --- swarm/src/connection.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/swarm/src/connection.rs b/swarm/src/connection.rs index 304f2b5c..1ef42bfd 100644 --- a/swarm/src/connection.rs +++ b/swarm/src/connection.rs @@ -347,7 +347,11 @@ pub struct ConnectionLimit { impl fmt::Display for ConnectionLimit { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}/{}", self.current, self.limit) + write!( + f, + "connection limit exceeded ({}/{})", + self.current, self.limit + ) } }