From 5d619e33f343161241e89d2796b2d71921eaa1a2 Mon Sep 17 00:00:00 2001 From: "Martin J. Lasek" Date: Mon, 20 Aug 2018 11:30:02 +0200 Subject: [PATCH] Fix RedisError to compile again Since the new Redis 3.0.0 release the RedisError init signature has changed causing the package not to compile. This patch removes `.capture()` from the init and makes the package work with Redis 3.0.0 --- Sources/Sugar/Helpers/Redis.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Sugar/Helpers/Redis.swift b/Sources/Sugar/Helpers/Redis.swift index 64e4a6d..b873ddc 100644 --- a/Sources/Sugar/Helpers/Redis.swift +++ b/Sources/Sugar/Helpers/Redis.swift @@ -4,7 +4,7 @@ extension RedisClient { public func expire(_ key: String, after deadline: Int) -> Future { let resp = command("EXPIRE", [RedisData(bulk: key), RedisData(bulk: "\(deadline)")]).map(to: Int.self) { data in guard let value = data.int else { - throw RedisError(identifier: "expire", reason: "Could not convert resp to int", source: .capture()) + throw RedisError(identifier: "expire", reason: "Could not convert response to int") } return value