Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Replace Future.flatMap with Future.then? #183

@MrMage

Description

@MrMage

Currently, Future.flatMap is implemented like this:

public func flatMap<T>(to type: T.Type = T.self, _ callback: @escaping (Expectation) throws -> Future<T>) -> Future<T> {

Would it be possible to call through to SwiftNIO's implementation of Future.then instead?

https://github.com/apple/swift-nio/blob/6f3671de4ed1350b86762e0da317075f69983f7d/Sources/NIO/EventLoopFuture.swift#L437

Let me know if I'm missing something.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions