mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +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) {
|
if (filepath == nullptr || strcmp(filepath, "-") == 0) {
|
||||||
buffer = Core::File::standard_input()->read_all();
|
buffer = Core::File::standard_input()->read_all();
|
||||||
} else {
|
} else {
|
||||||
auto result = Core::File::open(filepath, Core::OpenMode::ReadOnly);
|
auto file = TRY(Core::File::open(filepath, Core::OpenMode::ReadOnly));
|
||||||
VERIFY(!result.is_error());
|
|
||||||
auto file = result.value();
|
|
||||||
buffer = file->read_all();
|
buffer = file->read_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue