]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
Avoid using return in single-line closures
authorRoopesh Chander <roop@roopc.net>
Mon, 21 Jan 2019 20:14:07 +0000 (01:44 +0530)
committerRoopesh Chander <roop@roopc.net>
Mon, 21 Jan 2019 20:31:32 +0000 (02:01 +0530)
Signed-off-by: Roopesh Chander <roop@roopc.net>
WireGuard/WireGuard/UI/iOS/ViewController/TunnelEditTableViewController.swift
WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift

index 01a197ffb2720e512954ee224a47bd33b24c732f..02328af275e6252a785d0f9f4d557c1310533820 100644 (file)
@@ -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")
index cdc6d44845a020fd1ba1bbf4d796fb20fd6b320d..ef51e191199f8b7bc4dc8effce7f61b7b0315964 100644 (file)
@@ -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)!
     }