mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
AK: Use ErrorOr<T> for MappedFile factories
Replace Result<T, E> with ErrorOr<T> and propagate the error to callers.
This commit is contained in:
parent
c837bd551e
commit
0f5477c721
12 changed files with 54 additions and 64 deletions
|
@ -26,7 +26,7 @@ int main(int argc, char* argv[])
|
|||
// FIXME: Figure out how to do this sanely from stdin
|
||||
auto maybe_file = MappedFile::map(filename);
|
||||
if (maybe_file.is_error()) {
|
||||
warnln("Unable to dump device tree from file {}: {}", filename, maybe_file.error().string());
|
||||
warnln("Unable to dump device tree from file {}: {}", filename, maybe_file.error());
|
||||
return 1;
|
||||
}
|
||||
auto file = maybe_file.release_value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue