summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Myhra <kennethmyhra@gmail.com>2022-04-30 21:14:13 +0200
committerLinus Groh <mail@linusgroh.de>2022-05-02 22:18:27 +0200
commitbd81e15bc931be5422aabc32fd8eed0570b17352 (patch)
tree8c2de48474b1bcad38ff67f24a82ff35d2722121
parentec1f5fd20fd27653abb9fd3023db34881730da3a (diff)
downloadserenity-bd81e15bc931be5422aabc32fd8eed0570b17352.zip
base64: Use TRY() instead of VERIFY(!result.is_error())
-rw-r--r--Userland/Utilities/base64.cpp4
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();
}