Adds writer test case for RCU
[folly.git] / folly / fibers / Promise-inl.h
index bf39a96e361ef138c32c7213dd35623b381382b9..430eb5548862dd02f7bda04aa7b32ec077e9d1b0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2014-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -110,7 +110,7 @@ typename Promise<T, BatonT>::value_type Promise<T, BatonT>::await(F&& func) {
     std::rethrow_exception(funcException);
   }
 
-  return folly::moveFromTry(result);
-}
-}
+  return std::move(result).value();
 }
+} // namespace fibers
+} // namespace folly