mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-21 13:51:33 +00:00
swarm: Improve rendering of ConnectionLimit
error (#3043)
This commit is contained in:
@ -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
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user