aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-11-06 22:42:53 +0530
committerRoopesh Chander <roop@roopc.net>2018-11-06 22:42:53 +0530
commitf6a5dfead42649579ee2f901f7ca63de3cf698da (patch)
tree9b7d642c10150ccf7369514c83b4eaae99fbd4df
parentGlobal: swiftlint autocorrect (diff)
downloadwireguard-apple-f6a5dfead42649579ee2f901f7ca63de3cf698da.tar.xz
wireguard-apple-f6a5dfead42649579ee2f901f7ca63de3cf698da.zip
Global: swiftlint autocorrect --format
Signed-off-by: Roopesh Chander <roop@roopc.net>
-rw-r--r--WireGuard/WireGuard/Model/IPAddressRange.swift2
-rw-r--r--WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift4
-rw-r--r--WireGuard/WireGuard/UI/iOS/TunnelEditTableViewController.swift6
-rw-r--r--WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift6
-rw-r--r--WireGuard/WireGuard/VPN/TunnelsManager.swift12
5 files changed, 15 insertions, 15 deletions
diff --git a/WireGuard/WireGuard/Model/IPAddressRange.swift b/WireGuard/WireGuard/Model/IPAddressRange.swift
index 1e181d7..2fb4a16 100644
--- a/WireGuard/WireGuard/Model/IPAddressRange.swift
+++ b/WireGuard/WireGuard/Model/IPAddressRange.swift
@@ -19,7 +19,7 @@ extension IPAddressRange {
let addressString = String(string[string.startIndex ..< endOfIPAddress])
let address: IPAddress
if let addr = IPv4Address(addressString) {
- address = addr
+ address = addr
} else if let addr = IPv6Address(addressString) {
address = addr
} else {
diff --git a/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift
index 9120f38..9bd9f5a 100644
--- a/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift
+++ b/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift
@@ -9,7 +9,7 @@ class TunnelDetailTableViewController: UITableViewController {
let interfaceFields: [TunnelViewModel.InterfaceField] = [
.name, .publicKey, .addresses,
- .listenPort, .mtu, .dns
+ .listenPort, .mtu, .dns
]
let peerFields: [TunnelViewModel.PeerField] = [
@@ -125,7 +125,7 @@ extension TunnelDetailTableViewController {
return "Status"
} else if (section == 1) {
// Interface
- return "Interface"
+ return "Interface"
} else if ((numberOfPeerSections > 0) && (section < (2 + numberOfPeerSections))) {
// Peer
return "Peer"
diff --git a/WireGuard/WireGuard/UI/iOS/TunnelEditTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelEditTableViewController.swift
index 2f2b606..40d86e9 100644
--- a/WireGuard/WireGuard/UI/iOS/TunnelEditTableViewController.swift
+++ b/WireGuard/WireGuard/UI/iOS/TunnelEditTableViewController.swift
@@ -449,9 +449,9 @@ class TunnelEditTableViewKeyValueCell: UITableViewCell {
keyLabel.translatesAutoresizingMaskIntoConstraints = false
keyLabel.textAlignment = .right
let widthRatioConstraint = NSLayoutConstraint(item: keyLabel, attribute: .width,
- relatedBy: .equal,
- toItem: self, attribute: .width,
- multiplier: 0.4, constant: 0)
+ relatedBy: .equal,
+ toItem: self, attribute: .width,
+ multiplier: 0.4, constant: 0)
// The "Persistent Keepalive" key doesn't fit into 0.4 * width on the iPhone SE,
// so set a CR priority > the 0.4-constraint's priority.
widthRatioConstraint.priority = .defaultHigh + 1
diff --git a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
index bd067c8..b6c25ae 100644
--- a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
+++ b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
@@ -256,7 +256,7 @@ extension TunnelsListTableViewController: UIDocumentPickerDelegate {
} else {
// What if a file provider extension didn't respect our 'documentTypes' parameter
self.showErrorAlert(title: "Invalid file extension",
- message: "Please select a WireGuard configuration file (.conf) or a zip archive (.zip) for importing")
+ message: "Please select a WireGuard configuration file (.conf) or a zip archive (.zip) for importing")
}
}
}
@@ -266,7 +266,7 @@ extension TunnelsListTableViewController: UIDocumentPickerDelegate {
extension TunnelsListTableViewController: QRScanViewControllerDelegate {
func addScannedQRCode(tunnelConfiguration: TunnelConfiguration, qrScanViewController: QRScanViewController,
- completionHandler: (() -> Void)?) {
+ completionHandler: (() -> Void)?) {
tunnelsManager?.add(tunnelConfiguration: tunnelConfiguration) { (_, error) in
if let error = error {
ErrorPresenter.showErrorAlert(error: error, from: qrScanViewController, onDismissal: completionHandler)
@@ -330,7 +330,7 @@ extension TunnelsListTableViewController: UITableViewDelegate {
}
func tableView(_ tableView: UITableView,
- trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
+ trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
let deleteAction = UIContextualAction(style: .destructive, title: "Delete", handler: { [weak self] (_, _, completionHandler) in
guard let tunnelsManager = self?.tunnelsManager else { return }
let tunnel = tunnelsManager.tunnel(at: indexPath.row)
diff --git a/WireGuard/WireGuard/VPN/TunnelsManager.swift b/WireGuard/WireGuard/VPN/TunnelsManager.swift
index d0c0dc1..d0fe337 100644
--- a/WireGuard/WireGuard/VPN/TunnelsManager.swift
+++ b/WireGuard/WireGuard/VPN/TunnelsManager.swift
@@ -289,8 +289,8 @@ class TunnelContainer: NSObject {
return
}
s.startActivation(tunnelConfiguration: tunnelConfiguration,
- resolvedEndpoints: resolvedEndpoints,
- completionHandler: completionHandler)
+ resolvedEndpoints: resolvedEndpoints,
+ completionHandler: completionHandler)
}
}
}
@@ -356,10 +356,10 @@ class TunnelContainer: NSObject {
return
}
guard (vpnError.code == NEVPNError.configurationInvalid || vpnError.code == NEVPNError.configurationStale) else {
- os_log("Failed to activate tunnel: %{public}@", log: OSLog.default, type: .debug, "\(error)")
- status = .inactive
- completionHandler(error)
- return
+ os_log("Failed to activate tunnel: %{public}@", log: OSLog.default, type: .debug, "\(error)")
+ status = .inactive
+ completionHandler(error)
+ return
}
assert(vpnError.code == NEVPNError.configurationInvalid || vpnError.code == NEVPNError.configurationStale)
os_log("startActivation: Error says: %{public}@", log: OSLog.default, type: .debug,