[ox/std] Add Result::transformError

(synced from fdf39d1a25)
This commit is contained in:
2025-07-24 01:24:11 -05:00
parent f09f5e83c7
commit fc2166c109
+7
View File
@@ -307,6 +307,13 @@ struct [[nodiscard]] Result {
return std::move(value);
}
constexpr Result transformError(ErrorCode const ec, CString const msg) && {
if (error) {
error = Error{ec, msg};
}
return *this;
}
};
namespace detail {