mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
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:
parent
52687814ea
commit
4a916cd379
28 changed files with 69 additions and 77 deletions
|
@ -243,7 +243,7 @@ ErrorOr<int> execute_work_items(Vector<WorkItem> const& items)
|
|||
if (auto result = destination_file->write(bytes_read); result.is_error()) {
|
||||
// FIXME: Return the formatted string directly. There is no way to do this right now without the temporary going out of scope and being destroyed.
|
||||
report_warning(DeprecatedString::formatted("Failed to write to destination file: {}", result.error()));
|
||||
return result.error();
|
||||
return result.release_error();
|
||||
}
|
||||
item_done += bytes_read.size();
|
||||
executed_work_bytes += bytes_read.size();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue