[ox/std] Fix error handling for Result::copyTo

(synced from 9cc27f5be9)
This commit is contained in:
2023-12-14 22:28:16 -06:00
parent 0bf8f096c2
commit d389785bb5
+3 -1
View File
@@ -180,7 +180,9 @@ struct [[nodiscard]] Result {
}
constexpr Error copyTo(type &val) & noexcept {
*val = value;
if (!error) [[likely]] {
*val = value;
}
return error;
}