summaryrefslogtreecommitdiff
path: root/src/mongo/util/future_test_future_int.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2018-10-31 15:42:17 -0400
committerMathias Stearn <mathias@10gen.com>2018-11-15 17:25:11 -0500
commit3d7ed4fdd5e4840e9599a74ec92e16bc619bebf0 (patch)
tree2bd06655367af012e17bf80947cdb792fa1b9b44 /src/mongo/util/future_test_future_int.cpp
parent1ded7067e2d1a6161b15e5a462f8cba2d755c9a6 (diff)
downloadmongo-3d7ed4fdd5e4840e9599a74ec92e16bc619bebf0.tar.gz
SERVER-35682 kill existing SharedPromise type
This required plumbing unique_function into many more places.
Diffstat (limited to 'src/mongo/util/future_test_future_int.cpp')
-rw-r--r--src/mongo/util/future_test_future_int.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/util/future_test_future_int.cpp b/src/mongo/util/future_test_future_int.cpp
index aec0a556d87..92955d367fb 100644
--- a/src/mongo/util/future_test_future_int.cpp
+++ b/src/mongo/util/future_test_future_int.cpp
@@ -94,7 +94,7 @@ TEST(Future, Success_getAsync) {
[] { return 1; },
[](Future<int>&& fut) {
auto pf = makePromiseFuture<int>();
- std::move(fut).getAsync([outside = pf.promise.share()](StatusWith<int> sw) mutable {
+ std::move(fut).getAsync([outside = std::move(pf.promise)](StatusWith<int> sw) mutable {
ASSERT_OK(sw);
outside.emplaceValue(sw.getValue());
});
@@ -132,7 +132,7 @@ TEST(Future, Fail_getNothrowRvalue) {
TEST(Future, Fail_getAsync) {
FUTURE_FAIL_TEST<int>([](Future<int>&& fut) {
auto pf = makePromiseFuture<int>();
- std::move(fut).getAsync([outside = pf.promise.share()](StatusWith<int> sw) mutable {
+ std::move(fut).getAsync([outside = std::move(pf.promise)](StatusWith<int> sw) mutable {
ASSERT(!sw.isOK());
outside.setError(sw.getStatus());
});