mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-26 20:55:35 +03: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
@ -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 New Issue
Block a user