From 71f1daf5ebc25e2bb1b04b7ba004fce4910423b3 Mon Sep 17 00:00:00 2001 From: "Steffen D. Sommer" Date: Fri, 4 May 2018 18:20:31 +0200 Subject: [PATCH] Make Future extension public --- Sources/Flash/flash.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Flash/flash.swift b/Sources/Flash/flash.swift index b6d7711..64db487 100644 --- a/Sources/Flash/flash.swift +++ b/Sources/Flash/flash.swift @@ -58,7 +58,7 @@ public enum FlashType: String, Codable { case warning } -extension Response { +public extension Response { public func flash(_ type: FlashType, _ message: String) -> Response { if let container = try? privateContainer.make(FlashContainer.self) { container.flashes.append(.init(type, message)) @@ -68,8 +68,8 @@ extension Response { } } -extension EventLoopFuture where T: Response { - func flash(_ type: FlashType, _ message: String) -> Future { +public extension EventLoopFuture where T: Response { + public func flash(_ type: FlashType, _ message: String) -> Future { return self.map(to: Response.self) { res in if let container = try? res.privateContainer.make(FlashContainer.self) { container.flashes.append(.init(type, message))