Loading src/sled/futures/future.h +1 −1 Original line number Diff line number Diff line Loading @@ -346,7 +346,7 @@ public: return result; } static Future<T, FailureT> AsyncWithValue(const T &value) noexcept static Future<T, FailureT> AsyncValue(const T &value) noexcept { return Async([value]() { return value; }); } Loading src/sled/futures/future_test.cc +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ TEST_SUITE("future") return 1; }); CHECK_FALSE(f2.IsFailed()); auto f3 = sled::Future<std::string>::AsyncWithValue("11"); auto f3 = sled::Future<std::string>::AsyncValue("11"); CHECK_EQ(f3.Result(), "11"); } } Loading
src/sled/futures/future.h +1 −1 Original line number Diff line number Diff line Loading @@ -346,7 +346,7 @@ public: return result; } static Future<T, FailureT> AsyncWithValue(const T &value) noexcept static Future<T, FailureT> AsyncValue(const T &value) noexcept { return Async([value]() { return value; }); } Loading
src/sled/futures/future_test.cc +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ TEST_SUITE("future") return 1; }); CHECK_FALSE(f2.IsFailed()); auto f3 = sled::Future<std::string>::AsyncWithValue("11"); auto f3 = sled::Future<std::string>::AsyncValue("11"); CHECK_EQ(f3.Result(), "11"); } }