Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Fix RedisError to compile again
Browse files Browse the repository at this point in the history
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
  • Loading branch information
martinlasek authored Aug 20, 2018
1 parent 5d31bef commit 5d619e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Sugar/Helpers/Redis.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extension RedisClient {
public func expire(_ key: String, after deadline: Int) -> Future<Int> {
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
Expand Down

0 comments on commit 5d619e3

Please sign in to comment.