diff --git a/deps/ox/src/ox/std/error.hpp b/deps/ox/src/ox/std/error.hpp index 8635dc13..e1412ffe 100644 --- a/deps/ox/src/ox/std/error.hpp +++ b/deps/ox/src/ox/std/error.hpp @@ -174,7 +174,9 @@ struct [[nodiscard]] Result { } constexpr Error moveTo(type *val) noexcept { - *val = std::move(value); + if (!error) [[likely]] { + *val = std::move(value); + } return error; }