Skip to content

Commit

Permalink
io/uring/CoOperation: remove pointless std::exchange()
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Dec 6, 2024
1 parent 9d6b8b5 commit a3c3b3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/io/uring/CoOperation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CoOpenOperation::GetValue(int value)
if (value < 0)
throw MakeErrno(-value, "Failed to open file");

return UniqueFileDescriptor(std::exchange(value, -1));
return UniqueFileDescriptor{value};
}

CoCloseOperation::CoCloseOperation(struct io_uring_sqe &s,
Expand Down

0 comments on commit a3c3b3e

Please sign in to comment.