diff --git a/luna/include/luna/Option.h b/luna/include/luna/Option.h index a80cf433..9ef4a58d 100644 --- a/luna/include/luna/Option.h +++ b/luna/include/luna/Option.h @@ -50,10 +50,8 @@ template class Option T release_value() { expect(has_value(), "Option::release_value called on an empty Option"); - T item = m_storage.fetch_reference(); m_has_value = false; - m_storage.destroy(); - return move(item); + return move(m_storage.fetch_reference()); } T value_or(const T& other) const