diff options
author | Mathias Stearn <mathias@10gen.com> | 2018-10-31 15:42:17 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2018-11-15 17:25:11 -0500 |
commit | 3d7ed4fdd5e4840e9599a74ec92e16bc619bebf0 (patch) | |
tree | 2bd06655367af012e17bf80947cdb792fa1b9b44 /src/mongo/util/future_test_future_int.cpp | |
parent | 1ded7067e2d1a6161b15e5a462f8cba2d755c9a6 (diff) | |
download | mongo-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.cpp | 4 |
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()); }); |