mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +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
Notes:
sideshowbarker
2024-07-18 00:34:21 +09:00
Author: https://github.com/Hendiadyoin1 Commit: https://github.com/SerenityOS/serenity/commit/6f74c1bb11d Pull-request: https://github.com/SerenityOS/serenity/pull/10331 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/kleinesfilmroellchen
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…
Reference in a new issue