From 5b016df7f3101fded920299332b9557ae6a36cf4 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sun, 4 Nov 2018 18:30:47 +0100 Subject: [PATCH] Drop optional, lastModified is non-optional --- Passepartout/Sources/Services/InfrastructureFactory.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Passepartout/Sources/Services/InfrastructureFactory.swift b/Passepartout/Sources/Services/InfrastructureFactory.swift index b242c13f..94fb02e9 100644 --- a/Passepartout/Sources/Services/InfrastructureFactory.swift +++ b/Passepartout/Sources/Services/InfrastructureFactory.swift @@ -116,7 +116,7 @@ class InfrastructureFactory { return infra } - func update(_ name: Infrastructure.Name, notBeforeInterval minInterval: TimeInterval?, completionHandler: @escaping ((Infrastructure, Date?)?, Error?) -> Void) -> Bool { + func update(_ name: Infrastructure.Name, notBeforeInterval minInterval: TimeInterval?, completionHandler: @escaping ((Infrastructure, Date)?, Error?) -> Void) -> Bool { let ifModifiedSince = modificationDate(for: name) if let lastInfrastructureUpdate = lastUpdate[name] { @@ -170,7 +170,7 @@ class InfrastructureFactory { self.save(name, with: infra, lastModified: lastModified) DispatchQueue.main.async { - completionHandler((infra, response.lastModified), nil) + completionHandler((infra, lastModified), nil) } } return true