Avoid using return in single-line closures
This commit is contained in:
parent
1df572218d
commit
ef54cae788
|
@ -243,7 +243,7 @@ extension TunnelEditTableViewController {
|
|||
cell.placeholderText = tr("tunnelEditPlaceholderTextStronglyRecommended")
|
||||
cell.keyboardType = .numbersAndPunctuation
|
||||
case .dns:
|
||||
cell.placeholderText = tunnelViewModel.peersData.contains(where: { return $0.shouldStronglyRecommendDNS }) ? tr("tunnelEditPlaceholderTextStronglyRecommended") : tr("tunnelEditPlaceholderTextOptional")
|
||||
cell.placeholderText = tunnelViewModel.peersData.contains(where: { $0.shouldStronglyRecommendDNS }) ? tr("tunnelEditPlaceholderTextStronglyRecommended") : tr("tunnelEditPlaceholderTextOptional")
|
||||
cell.keyboardType = .numbersAndPunctuation
|
||||
case .listenPort, .mtu:
|
||||
cell.placeholderText = tr("tunnelEditPlaceholderTextAutomatic")
|
||||
|
|
|
@ -130,9 +130,7 @@ class TunnelEditViewController: NSViewController {
|
|||
selectedActivateOnDemandOption = .none
|
||||
}
|
||||
|
||||
onDemandRow.valueOptions = activateOnDemandOptions.map {
|
||||
return TunnelViewModel.activateOnDemandOptionText(for: $0)
|
||||
}
|
||||
onDemandRow.valueOptions = activateOnDemandOptions.map { TunnelViewModel.activateOnDemandOptionText(for: $0) }
|
||||
onDemandRow.selectedOptionIndex = activateOnDemandOptions.firstIndex(of: selectedActivateOnDemandOption)!
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue