mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +00:00
base64: Use TRY() instead of VERIFY(!result.is_error())
This commit is contained in:
parent
ec1f5fd20f
commit
bd81e15bc9
1 changed files with 1 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue