Everywhere: Remove needless copies of Error / ErrorOr instances

Either take the underlying objects with release_* methods or move() the
instances around.
This commit is contained in:
Timothy Flynn 2023-02-09 13:26:53 -05:00 committed by Linus Groh
commit 4a916cd379
Notes: sideshowbarker 2024-07-17 03:03:15 +09:00
28 changed files with 69 additions and 77 deletions

View file

@ -53,7 +53,7 @@ ErrorOr<void> Heap::open()
if (file_size > 0) {
if (auto error_maybe = read_zero_block(); error_maybe.is_error()) {
m_file = nullptr;
return error_maybe.error();
return error_maybe.release_error();
}
} else {
initialize_zero_block();