code clean-up: @discardableResult, unused params, simplify getting specific relays from pool
Closes: #635
This commit is contained in:
committed by
William Casarin
parent
a1a89dc98e
commit
193e922c9c
@@ -22,9 +22,8 @@ struct RelayConfigView: View {
|
||||
|
||||
var recommended: [RelayDescriptor] {
|
||||
let rs: [RelayDescriptor] = []
|
||||
return BOOTSTRAP_RELAYS.reduce(into: rs) { (xs, x) in
|
||||
if let _ = state.pool.get_relay(x) {
|
||||
} else {
|
||||
return BOOTSTRAP_RELAYS.reduce(into: rs) { xs, x in
|
||||
if state.pool.get_relay(x) == nil {
|
||||
xs.append(RelayDescriptor(url: URL(string: x)!, info: .rw))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user