summaryrefslogtreecommitdiff
path: root/Userland/Services/FileOperation
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2023-02-09 13:26:53 -0500
committerLinus Groh <mail@linusgroh.de>2023-02-10 09:08:52 +0000
commit4a916cd3796cef0ef10374fcf9a602c96e226e6c (patch)
tree8794ceaaad624514796fba84e0a79e3a407079fc /Userland/Services/FileOperation
parent52687814ea8f80ea2a0f38af0902e4223a0a76b9 (diff)
downloadserenity-4a916cd3796cef0ef10374fcf9a602c96e226e6c.zip
Everywhere: Remove needless copies of Error / ErrorOr instances
Either take the underlying objects with release_* methods or move() the instances around.
Diffstat (limited to 'Userland/Services/FileOperation')
-rw-r--r--Userland/Services/FileOperation/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Services/FileOperation/main.cpp b/Userland/Services/FileOperation/main.cpp
index 2e6b7f7c66..37e11d0ffd 100644
--- a/Userland/Services/FileOperation/main.cpp
+++ b/Userland/Services/FileOperation/main.cpp
@@ -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();