diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-21 13:27:03 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-21 16:19:18 +0200 |
commit | ba3b561a40af8de42468e7987b8d84884294bf76 (patch) | |
tree | ecde12a3156e08e7dc1e08500dc04ce5a5cdffc8 /Libraries | |
parent | 59cd181ed9eac9c45a59f93d3a45a21accf1fec3 (diff) | |
download | serenity-ba3b561a40af8de42468e7987b8d84884294bf76.zip |
AK: Simplify Result class so we can start using it
There were some ideas about how to use this class but we never actually
started using it, so let's just simplify it and get it ready for use.
The basic idea is: a function returns a Result<ValueType, ErrorType>.
Callers check if the result object is_error(). If so, an ErrorType can
be fetched with the error() getter. Otherwise, a ValueType is fetched
with the value() getter. That's it. :^)
Diffstat (limited to 'Libraries')
0 files changed, 0 insertions, 0 deletions