mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
AK: Allow to "get a result" from Result<void>
This is to make Result<void> work inside TRY
This commit is contained in:
parent
b1982267b2
commit
6f74c1bb11
1 changed files with 4 additions and 0 deletions
|
@ -93,6 +93,10 @@ public:
|
|||
Result(const Result& other) = default;
|
||||
~Result() = default;
|
||||
|
||||
// For compatibility with TRY().
|
||||
void value() {};
|
||||
void release_value() {};
|
||||
|
||||
ErrorType& error()
|
||||
{
|
||||
return m_error.value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue