Skip to content

Commit 562e476

Browse files
LeeHowesfacebook-github-bot
authored andcommitted
Future<T>::then Future<T>::then(not-try-task) -> Future<T>::thenValue(task).
Summary: Overall plan to modify Future<T>::then to be r-value qualified and use Future<T>::thenTry or Future<T>::thenValue. The goal is to disambiguate folly::Future and to improve type and lifetime safety of Future and its methods. Codemod: * future<T>.then(callable with operator()(not-a-try)) to future<T>.thenValue(callable with operator()(not-a-try)). * future<T>.then(callable with operator()()) to future<T>.thenValue(callable with operator()(auto&&)). * future<T>.then(callable with operator()(auto)) to future<T>.thenValue(callable with operator()(auto)). Reviewed By: yfeldblum Differential Revision: D9520816 fbshipit-source-id: f0438cfe489ba676d80a5ca0dae58c0501d040c9
1 parent 0faf4b5 commit 562e476

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rsocket/RSocketClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ folly::Future<folly::Unit> RSocketClient::resume() {
7575
<< "resume";
7676

7777
return connectionFactory_->connect(protocolVersion_, ResumeStatus::RESUMING)
78-
.then(
78+
.thenValue(
7979
[this](
8080
ConnectionFactory::ConnectedDuplexConnection connection) mutable {
8181
return resumeFromConnection(std::move(connection));

0 commit comments

Comments
 (0)