diff --git a/Sources/NIO/EventLoopFuture.swift b/Sources/NIO/EventLoopFuture.swift index 6b90e60c7..3fbe57c52 100644 --- a/Sources/NIO/EventLoopFuture.swift +++ b/Sources/NIO/EventLoopFuture.swift @@ -580,7 +580,9 @@ extension EventLoopFuture { /// a new value lifted into a new `EventLoopFuture`. /// - returns: A future that will receive the recovered value. public func mapIfError(file: StaticString = #file, line: UInt = #line, _ callback: @escaping (Error) -> T) -> EventLoopFuture { - return thenIfError { return EventLoopFuture(eventLoop: self.eventLoop, result: callback($0), file: file, line: line) } + return thenIfError(file: file, line: line) { + return EventLoopFuture(eventLoop: self.eventLoop, result: callback($0), file: file, line: line) + } }