1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:04:57 +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:
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

@ -181,7 +181,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto result_or_error = Core::System::mkdir(absolute_path, header_mode);
if (result_or_error.is_error() && result_or_error.error().code() != EEXIST)
return result_or_error.error();
return result_or_error.release_error();
break;
}
default: