Commit d188bd70 authored by Igor Sugak's avatar Igor Sugak Committed by Facebook Github Bot

run clang-format again

Summary: as titled

Reviewed By: Orvid

Differential Revision: D12922934

fbshipit-source-id: b283b905393d93fb41f18553f12ad33f335e1507
parent 03f0917a
......@@ -18,8 +18,8 @@
#include <cstddef>
#include <folly/portability/Config.h>
#include <folly/CPortability.h>
#include <folly/portability/Config.h>
// Unaligned loads and stores
namespace folly {
......
......@@ -400,26 +400,26 @@ FutureBase<T>::thenImplementation(F&& func, R) {
auto f = Future<B>(sf.core_);
sf.core_ = nullptr;
this->setCallback_([state = futures::detail::makeCoreCallbackState(
std::move(p), std::forward<F>(func))](
Try<T>&& t) mutable {
if (!R::Arg::isTry() && t.hasException()) {
state.setException(std::move(t.exception()));
} else {
// Ensure that if function returned a SemiFuture we correctly chain
// potential deferral.
auto tf2 = detail_msvc_15_7_workaround::tryInvoke(R{}, state, t);
if (tf2.hasException()) {
state.setException(std::move(tf2.exception()));
} else {
auto statePromise = state.stealPromise();
auto tf3 =
chainExecutor(statePromise.core_->getExecutor(), *std::move(tf2));
std::exchange(statePromise.core_, nullptr)
->setProxy(std::exchange(tf3.core_, nullptr));
}
}
});
this->setCallback_(
[state = futures::detail::makeCoreCallbackState(
std::move(p), std::forward<F>(func))](Try<T>&& t) mutable {
if (!R::Arg::isTry() && t.hasException()) {
state.setException(std::move(t.exception()));
} else {
// Ensure that if function returned a SemiFuture we correctly chain
// potential deferral.
auto tf2 = detail_msvc_15_7_workaround::tryInvoke(R{}, state, t);
if (tf2.hasException()) {
state.setException(std::move(tf2.exception()));
} else {
auto statePromise = state.stealPromise();
auto tf3 = chainExecutor(
statePromise.core_->getExecutor(), *std::move(tf2));
std::exchange(statePromise.core_, nullptr)
->setProxy(std::exchange(tf3.core_, nullptr));
}
}
});
return f;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment