mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
Kernel: Add KResultOr::release_error()
This is just for symmetry with AK::Result, so that we can use them interchangeably in generic code.
This commit is contained in:
parent
09dd397160
commit
fd44336ef8
1 changed files with 6 additions and 0 deletions
|
@ -162,6 +162,12 @@ public:
|
|||
return released_value;
|
||||
}
|
||||
|
||||
[[nodiscard]] KResult release_error()
|
||||
{
|
||||
VERIFY(m_is_error);
|
||||
return m_error;
|
||||
}
|
||||
|
||||
private:
|
||||
union {
|
||||
alignas(T) char m_storage[sizeof(T)];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue