From 8a916beb389f84e21ed1aaf0d246801cd6acd73c Mon Sep 17 00:00:00 2001 From: Eric Kuck Date: Wed, 12 Dec 2018 21:09:52 -0600 Subject: More formatting nits and cyclomatic complexity fixes Signed-off-by: Eric Kuck --- WireGuard/WireGuard/ZipArchive/ZipArchive.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'WireGuard/WireGuard/ZipArchive/ZipArchive.swift') diff --git a/WireGuard/WireGuard/ZipArchive/ZipArchive.swift b/WireGuard/WireGuard/ZipArchive/ZipArchive.swift index 12cfb69..ad74d0e 100644 --- a/WireGuard/WireGuard/ZipArchive/ZipArchive.swift +++ b/WireGuard/WireGuard/ZipArchive/ZipArchive.swift @@ -8,7 +8,7 @@ enum ZipArchiveError: WireGuardAppError { case cantOpenOutputZipFileForWriting case badArchive - func alertText() -> (String, String)? { + func alertText() -> AlertText { switch self { case .cantOpenInputZipFile: return ("Unable to read zip archive", "The zip archive could not be read.") @@ -41,7 +41,7 @@ class ZipArchive { static func unarchive(url: URL, requiredFileExtensions: [String]) throws -> [(fileBaseName: String, contents: Data)] { - var results: [(fileBaseName: String, contents: Data)] = [] + var results = [(fileBaseName: String, contents: Data)]() guard let zipFile = unzOpen64(url.path) else { throw ZipArchiveError.cantOpenInputZipFile -- cgit v1.2.3-59-g8ed1b