Skip to content

Commit 48b8f17

Browse files
defunctioacatangiu
authored andcommitted
use epoll implementation from vmm-sys-util
Signed-off-by: defunct <[email protected]> Signed-off-by: YUAN LYU <[email protected]>
1 parent 17ead39 commit 48b8f17

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/server.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ impl HttpServer {
419419
/// epoll.ctl(
420420
/// epoll::ControlOperation::Add,
421421
/// server.epoll().as_raw_fd(),
422-
/// &epoll::EpollEvent::new(epoll::EventSet::IN, 1234u64),
422+
/// epoll::EpollEvent::new(epoll::EventSet::IN, 1234u64),
423423
/// )
424424
/// .unwrap();
425425
///
@@ -523,7 +523,7 @@ impl HttpServer {
523523
fn epoll_mod(epoll: &epoll::Epoll, stream_fd: RawFd, evset: epoll::EventSet) -> Result<()> {
524524
let event = epoll::EpollEvent::new(evset, stream_fd as u64);
525525
epoll
526-
.ctl(epoll::ControlOperation::Modify, stream_fd, &event)
526+
.ctl(epoll::ControlOperation::Modify, stream_fd, event)
527527
.map_err(ServerError::IOError)
528528
}
529529

@@ -536,7 +536,7 @@ impl HttpServer {
536536
.ctl(
537537
epoll::ControlOperation::Add,
538538
stream_fd,
539-
&epoll::EpollEvent::new(epoll::EventSet::IN, stream_fd as u64),
539+
epoll::EpollEvent::new(epoll::EventSet::IN, stream_fd as u64),
540540
)
541541
.map_err(ServerError::IOError)
542542
}

0 commit comments

Comments
 (0)