Skip to content

Commit

Permalink
refactor(driver): as_reader_fd -> reader_fd
Browse files Browse the repository at this point in the history
  • Loading branch information
Berrysoft committed Mar 4, 2024
1 parent 5799e6c commit be7f7b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compio-driver/src/poll/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ impl Driver {
};

let notifier = Notifier::new()?;
let fd = notifier.as_reader_fd();
let fd = notifier.reader_fd();

let poll = Arc::new(Poller::new()?);
// Attach the reader to poll.
Expand Down Expand Up @@ -290,7 +290,7 @@ impl Driver {
}
for event in self.events.iter() {
let fd = event.key as RawFd;
if fd == self.notifier.as_reader_fd() {
if fd == self.notifier.reader_fd() {
self.notifier.clear()?;
continue;
}
Expand Down Expand Up @@ -389,7 +389,7 @@ impl Notifier {
}
}

pub fn as_reader_fd(&self) -> RawFd {
pub fn reader_fd(&self) -> RawFd {
self.notify_reader.as_raw_fd()
}
}
Expand Down

0 comments on commit be7f7b6

Please sign in to comment.