summaryrefslogtreecommitdiff
path: root/Userland/Utilities/rm.cpp
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/Utilities/rm.cpp
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/Utilities/rm.cpp')
-rw-r--r--Userland/Utilities/rm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Utilities/rm.cpp b/Userland/Utilities/rm.cpp
index 01f7b2be85..15670ec53d 100644
--- a/Userland/Utilities/rm.cpp
+++ b/Userland/Utilities/rm.cpp
@@ -46,7 +46,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto result = Core::File::remove(path, recursive ? Core::File::RecursionMode::Allowed : Core::File::RecursionMode::Disallowed);
if (result.is_error()) {
- auto error = result.error();
+ auto error = result.release_error();
if (force && error.is_errno() && error.code() == ENOENT)
continue;