swarm: Improve rendering of ConnectionLimit error (#3043)

This commit is contained in:
Roland Kuhn
2022-10-20 00:46:23 +01:00
committed by GitHub
parent 4d4833f8c2
commit c84a0fb86b

View File

@ -347,7 +347,11 @@ pub struct ConnectionLimit {
impl fmt::Display for ConnectionLimit { impl fmt::Display for ConnectionLimit {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}/{}", self.current, self.limit) write!(
f,
"connection limit exceeded ({}/{})",
self.current, self.limit
)
} }
} }