aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/WireGuardResult.swift
diff options
context:
space:
mode:
authorEric Kuck <eric@bluelinelabs.com>2018-12-12 11:40:57 -0600
committerEric Kuck <eric@bluelinelabs.com>2018-12-12 11:40:57 -0600
commitde14b76b4d99f74d52b6e404b2ab37394fa5b9dc (patch)
tree0d6e1efbf855bb4995b22e6c55ab8ab2f08e8f24 /WireGuard/WireGuard/WireGuardResult.swift
parentZip importing: importFromFile should take a completionHandler (diff)
downloadwireguard-apple-de14b76b4d99f74d52b6e404b2ab37394fa5b9dc.tar.xz
wireguard-apple-de14b76b4d99f74d52b6e404b2ab37394fa5b9dc.zip
Added swiftlint and fixed all errors (and a bunch, but not all, warnings)
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
Diffstat (limited to 'WireGuard/WireGuard/WireGuardResult.swift')
-rw-r--r--WireGuard/WireGuard/WireGuardResult.swift16
1 files changed, 8 insertions, 8 deletions
diff --git a/WireGuard/WireGuard/WireGuardResult.swift b/WireGuard/WireGuard/WireGuardResult.swift
index 93fc4c2c..92f73cd8 100644
--- a/WireGuard/WireGuard/WireGuardResult.swift
+++ b/WireGuard/WireGuard/WireGuardResult.swift
@@ -2,27 +2,27 @@
// Copyright © 2018 WireGuard LLC. All Rights Reserved.
enum WireGuardResult<T> {
- case success(T)
- case failure(WireGuardAppError)
+ case success(_ value: T)
+ case failure(_ error: WireGuardAppError)
var value: T? {
switch (self) {
- case .success(let v): return v
- case .failure(_): return nil
+ case .success(let value): return value
+ case .failure: return nil
}
}
var error: WireGuardAppError? {
switch (self) {
- case .success(_): return nil
- case .failure(let e): return e
+ case .success: return nil
+ case .failure(let error): return error
}
}
var isSuccess: Bool {
switch (self) {
- case .success(_): return true
- case .failure(_): return false
+ case .success: return true
+ case .failure: return false
}
}
}