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
parent 52687814ea
commit 4a916cd379
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();