diff options
author | Kenneth Myhra <kennethmyhra@gmail.com> | 2022-04-30 21:14:13 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-05-02 22:18:27 +0200 |
commit | bd81e15bc931be5422aabc32fd8eed0570b17352 (patch) | |
tree | 8c2de48474b1bcad38ff67f24a82ff35d2722121 | |
parent | ec1f5fd20fd27653abb9fd3023db34881730da3a (diff) | |
download | serenity-bd81e15bc931be5422aabc32fd8eed0570b17352.zip |
base64: Use TRY() instead of VERIFY(!result.is_error())
-rw-r--r-- | Userland/Utilities/base64.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Utilities/base64.cpp b/Userland/Utilities/base64.cpp index 28e521644f..5d9047f263 100644 --- a/Userland/Utilities/base64.cpp +++ b/Userland/Utilities/base64.cpp @@ -27,9 +27,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) if (filepath == nullptr || strcmp(filepath, "-") == 0) { buffer = Core::File::standard_input()->read_all(); } else { - auto result = Core::File::open(filepath, Core::OpenMode::ReadOnly); - VERIFY(!result.is_error()); - auto file = result.value(); + auto file = TRY(Core::File::open(filepath, Core::OpenMode::ReadOnly)); buffer = file->read_all(); } |