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:
parent
52687814ea
commit
4a916cd379
28 changed files with 69 additions and 77 deletions
|
@ -33,7 +33,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto stat = Core::System::lstat(path);
|
||||
|
||||
if (stat.is_error() && stat.error().code() != ENOENT)
|
||||
return stat.error();
|
||||
return stat.release_error();
|
||||
|
||||
if (!stat.is_error() && S_ISDIR(stat.value().st_mode)) {
|
||||
// The target path is a directory, so we presumably want <path>/<filename> as the effective path.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue