Commit f706bdbd authored by James Sedgwick's avatar James Sedgwick Committed by Alecs King

fix build

Summary:
^

Test Plan: compiles

Reviewed By: hans@fb.com

Subscribers: folly-diffs@, jsedgwick, yfeldblum, chalfant

FB internal diff: D1998822

Signature: t1:1998822:1429211074:3ff9b0827a8ce029efa06a4a78ecea2b07eae3a8
parent 3e68d7b4
...@@ -345,7 +345,7 @@ Future<T>::onError(F&& func) { ...@@ -345,7 +345,7 @@ Future<T>::onError(F&& func) {
try { try {
auto f2 = (*funcm)(std::move(t.exception())); auto f2 = (*funcm)(std::move(t.exception()));
f2.setCallback_([pm](Try<T> t2) mutable { f2.setCallback_([pm](Try<T> t2) mutable {
pm->fulfilTry(std::move(t2)); pm->setTry(std::move(t2));
}); });
} catch (const std::exception& e2) { } catch (const std::exception& e2) {
pm->setException(exception_wrapper(std::current_exception(), e2)); pm->setException(exception_wrapper(std::current_exception(), e2));
...@@ -353,7 +353,7 @@ Future<T>::onError(F&& func) { ...@@ -353,7 +353,7 @@ Future<T>::onError(F&& func) {
pm->setException(exception_wrapper(std::current_exception())); pm->setException(exception_wrapper(std::current_exception()));
} }
} else { } else {
pm->fulfilTry(std::move(t)); pm->setTry(std::move(t));
} }
}); });
...@@ -378,11 +378,11 @@ Future<T>::onError(F&& func) { ...@@ -378,11 +378,11 @@ Future<T>::onError(F&& func) {
auto funcm = folly::makeMoveWrapper(std::move(func)); auto funcm = folly::makeMoveWrapper(std::move(func));
setCallback_([pm, funcm](Try<T> t) mutable { setCallback_([pm, funcm](Try<T> t) mutable {
if (t.hasException()) { if (t.hasException()) {
pm->fulfil([&]{ pm->setWith([&]{
return (*funcm)(std::move(t.exception())); return (*funcm)(std::move(t.exception()));
}); });
} else { } else {
pm->fulfilTry(std::move(t)); pm->setTry(std::move(t));
} }
}); });
......
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