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
Notes: sideshowbarker 2024-07-17 03:03:15 +09:00
28 changed files with 69 additions and 77 deletions

View file

@ -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;