Removes misleading docs for whenComplete (#1687)

Upon the addition of `Result` in the Swift standard library, apple/swift-nio#734
updated `EventLoopFuture.whenComplete(_:)` to pass a `Result<T, Error>` to
its `callback`, but the documentation still confusingly states:

> Unlike its friends… `whenComplete` does not receive the result of the
> `EventLoopFuture`.

This patch fixes that by removing the (now inaccurate) lines.
This commit is contained in:
jemmons 2020-11-11 14:23:22 -05:00 committed by GitHub
parent 255f29d3f3
commit 5939c78fca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 8 deletions

View File

@ -727,10 +727,6 @@ extension EventLoopFuture {
/// Adds an observer callback to this `EventLoopFuture` that is called when the
/// `EventLoopFuture` has any result.
///
/// Unlike its friends `whenSuccess` and `whenFailure`, `whenComplete` does not receive the result
/// of the `EventLoopFuture`. This is because its primary purpose is to do the appropriate cleanup
/// of any resources that needed to be kept open until the `EventLoopFuture` had resolved.
///
/// - parameters:
/// - callback: The callback that is called when the `EventLoopFuture` is fulfilled.
@inlinable
@ -1464,10 +1460,6 @@ extension EventLoopFuture {
/// Adds an observer callback to this `EventLoopFuture` that is called when the
/// `EventLoopFuture` has any result. The observer callback is permitted to block.
///
/// Unlike its friends `whenSuccess` and `whenFailure`, `whenComplete` does not receive the result
/// of the `EventLoopFuture`. This is because its primary purpose is to do the appropriate cleanup
/// of any resources that needed to be kept open until the `EventLoopFuture` had resolved.
///
/// - parameters:
/// - onto: the `DispatchQueue` on which the blocking IO / task specified by `callbackMayBlock` is schedulded.
/// - callbackMayBlock: The callback that is called when the `EventLoopFuture` is fulfilled.