Skip to content

Commit

Permalink
Review mio imports in io.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed Nov 17, 2024
1 parent bf7d2f0 commit a90d280
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/io.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#[cfg(unix)]
use mio::unix::SourceFd;
use mio::{
event::Source as MioSource,
net::{TcpListener, TcpStream},
Token,
Interest, Registry, Token,
};
#[cfg(unix)]
use mio::unix::SourceFd;
#[cfg(unix)]
use std::os::fd::RawFd;
#[cfg(windows)]
use std::os::windows::io::RawSocket;
Expand Down Expand Up @@ -42,7 +42,7 @@ impl<'a> MioSource for SourceRawSocket<'a> {

impl MioSource for Source {
#[inline]
fn register(&mut self, registry: &mio::Registry, token: Token, interests: mio::Interest) -> std::io::Result<()> {
fn register(&mut self, registry: &Registry, token: Token, interests: Interest) -> std::io::Result<()> {
match self {
Self::TCPListener(inner) => inner.register(registry, token, interests),
Self::TCPStream(inner) => inner.register(registry, token, interests),
Expand All @@ -54,7 +54,7 @@ impl MioSource for Source {
}

#[inline]
fn reregister(&mut self, registry: &mio::Registry, token: Token, interests: mio::Interest) -> std::io::Result<()> {
fn reregister(&mut self, registry: &Registry, token: Token, interests: Interest) -> std::io::Result<()> {
match self {
Self::TCPListener(inner) => inner.reregister(registry, token, interests),
Self::TCPStream(inner) => inner.reregister(registry, token, interests),
Expand All @@ -66,7 +66,7 @@ impl MioSource for Source {
}

#[inline]
fn deregister(&mut self, registry: &mio::Registry) -> std::io::Result<()> {
fn deregister(&mut self, registry: &Registry) -> std::io::Result<()> {
match self {
Self::TCPListener(inner) => inner.deregister(registry),
Self::TCPStream(inner) => inner.deregister(registry),
Expand Down

0 comments on commit a90d280

Please sign in to comment.