diff --git a/src/sled/futures/future.h b/src/sled/futures/future.h index 5bd6378..b874cec 100644 --- a/src/sled/futures/future.h +++ b/src/sled/futures/future.h @@ -346,7 +346,7 @@ public: return result; } - static Future AsyncWithValue(const T &value) noexcept + static Future AsyncValue(const T &value) noexcept { return Async([value]() { return value; }); } diff --git a/src/sled/futures/future_test.cc b/src/sled/futures/future_test.cc index 5f7af21..36ba3c9 100644 --- a/src/sled/futures/future_test.cc +++ b/src/sled/futures/future_test.cc @@ -113,7 +113,7 @@ TEST_SUITE("future") return 1; }); CHECK_FALSE(f2.IsFailed()); - auto f3 = sled::Future::AsyncWithValue("11"); + auto f3 = sled::Future::AsyncValue("11"); CHECK_EQ(f3.Result(), "11"); } }