Fix TRY_STATUS_PROMISE usage with Result.

This commit is contained in:
levlam 2021-07-17 23:37:03 +03:00
parent 1f9c6c7352
commit c5cee50877

View File

@ -36,13 +36,13 @@
} \ } \
} }
#define TRY_STATUS_PROMISE(promise_name, status) \ #define TRY_STATUS_PROMISE(promise_name, status) \
{ \ { \
auto try_status = (status); \ auto try_status = (status); \
if (try_status.is_error()) { \ if (try_status.is_error()) { \
promise_name.set_error(std::move(try_status)); \ promise_name.set_error(try_status.move_as_error()); \
return; \ return; \
} \ } \
} }
#define TRY_STATUS_PROMISE_PREFIX(promise_name, status, prefix) \ #define TRY_STATUS_PROMISE_PREFIX(promise_name, status, prefix) \