mirror of https://github.com/oxen-io/session-ios
Remove snodes from a swarm if they failed repeatedly
parent
02dd81516b
commit
f32bb85ddc
@ -0,0 +1,13 @@
|
||||
|
||||
public extension Dictionary {
|
||||
|
||||
public var prettifiedDescription: String {
|
||||
return "[ " + map { key, value in
|
||||
let keyDescription = String(describing: key)
|
||||
let valueDescription = String(describing: value)
|
||||
let maxLength = 20
|
||||
let truncatedValueDescription = valueDescription.count > maxLength ? valueDescription.prefix(maxLength) + "..." : valueDescription
|
||||
return keyDescription + " : " + truncatedValueDescription
|
||||
}.joined(separator: ", ") + " ]"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue