Summary: This is a case of having to say what you're doing twice, and it's unnecessary.
This change should not break anything as calling `std::move(lvalue)` where an
lvalue reference is expected will just be superfluous.
Reviewed By: @jsedgwick
Differential Revision:
D2534944
fb-gh-sync-id:
fdcd168f369d95b0f28abe23b401b4321f51fc36
func(Promise<Result>(result, baton));
});
- return folly::moveFromTry(std::move(result));
+ return folly::moveFromTry(result);
}
}}
}
template <typename T>
-inline T moveFromTry(Try<T>&& t) {
+inline T moveFromTry(Try<T>& t) {
return std::move(t.value());
}
-inline void moveFromTry(Try<void>&& t) {
+inline void moveFromTry(Try<void>& t) {
return t.value();
}
* @returns value contained in t
*/
template <typename T>
-T moveFromTry(Try<T>&& t);
+T moveFromTry(Try<T>& t);
/*
* Throws if try contained an exception.
*
* @param t Try to move from
*/
-void moveFromTry(Try<void>&& t);
+void moveFromTry(Try<void>& t);
/*
* @param f a function to execute and capture the result of (value or exception)