mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Motivation: #fileID introduced in Swift 5.3, so no longer need to use #file anywhere Modifications: Changed #file to #filePath or #fileID depending on the situation
28 lines
1.1 KiB
Swift
28 lines
1.1 KiB
Swift
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the SwiftNIO open source project
|
|
//
|
|
// Copyright (c) 2021 Apple Inc. and the SwiftNIO project authors
|
|
// Licensed under Apache License v2.0
|
|
//
|
|
// See LICENSE.txt for license information
|
|
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
extension EventLoop {
|
|
@inlinable
|
|
@available(*, deprecated, message: "Please don't pass file:line:, there's no point.")
|
|
public func makeFailedFuture<T>(_ error: Error, file: StaticString = #fileID, line: UInt = #line) -> EventLoopFuture<T> {
|
|
return self.makeFailedFuture(error)
|
|
}
|
|
|
|
@inlinable
|
|
@available(*, deprecated, message: "Please don't pass file:line:, there's no point.")
|
|
public func makeSucceededFuture<Success>(_ value: Success, file: StaticString = #fileID, line: UInt = #line) -> EventLoopFuture<Success> {
|
|
return self.makeSucceededFuture(value)
|
|
}
|
|
}
|