Skip to content

Commit

Permalink
return type
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC committed Dec 11, 2023
1 parent bdaabfc commit 23e2fb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sys/eventfd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl EventFd {
/// [`EventFd::write`] with `value`.
pub fn write(&self, value: eventfd_t) -> Result<usize> {
let res = unsafe { libc::eventfd_write(self.0.as_raw_fd(), value) };
Errno::result(res)
Errno::result(res).map(|res| res as usize)
}
// Reads the value from the file descriptor.
pub fn read(&self) -> Result<eventfd_t> {
Expand Down

0 comments on commit 23e2fb7

Please sign in to comment.