mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +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
|
@ -238,12 +238,12 @@ private:
|
|||
auto result = stream().read(fillable_slice);
|
||||
if (result.is_error()) {
|
||||
if (!result.error().is_errno())
|
||||
return result.error();
|
||||
return result.release_error();
|
||||
if (result.error().code() == EINTR)
|
||||
continue;
|
||||
if (result.error().code() == EAGAIN)
|
||||
break;
|
||||
return result.error();
|
||||
return result.release_error();
|
||||
}
|
||||
auto const filled_slice = result.value();
|
||||
VERIFY(m_buffer.write(filled_slice) == filled_slice.size());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue