Skip to content

Commit

Permalink
📝 fix cargo clippy warnings for unix
Browse files Browse the repository at this point in the history
  • Loading branch information
Xudong-Huang committed Oct 7, 2024
1 parent 8c89bf3 commit 5ecd454
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/io/sys/unix/net/socket_peek.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl<'a> SocketPeek<'a> {
}
}

impl<'a> EventSource for SocketPeek<'a> {
impl EventSource for SocketPeek<'_> {
fn subscribe(&mut self, co: CoroutineImpl) {
#[cfg(feature = "io_cancel")]
let cancel = co_cancel_data(&co);
Expand Down
2 changes: 1 addition & 1 deletion src/io/sys/unix/net/socket_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl<'a> SocketRead<'a> {
}
}

impl<'a> EventSource for SocketRead<'a> {
impl EventSource for SocketRead<'_> {
fn subscribe(&mut self, co: CoroutineImpl) {
#[cfg(feature = "io_cancel")]
let cancel = co_cancel_data(&co);
Expand Down
2 changes: 1 addition & 1 deletion src/io/sys/unix/net/socket_write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl<'a> SocketWrite<'a> {
}
}

impl<'a> EventSource for SocketWrite<'a> {
impl EventSource for SocketWrite<'_> {
fn subscribe(&mut self, co: CoroutineImpl) {
let io_data = self.io_data;

Expand Down
2 changes: 1 addition & 1 deletion src/io/sys/unix/net/socket_write_vectored.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl<'a> SocketWriteVectored<'a> {
}
}

impl<'a> EventSource for SocketWriteVectored<'a> {
impl EventSource for SocketWriteVectored<'_> {
fn subscribe(&mut self, co: CoroutineImpl) {
let io_data = self.io_data;

Expand Down
2 changes: 1 addition & 1 deletion src/io/sys/unix/net/tcp_listener_accept.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl<'a> TcpListenerAccept<'a> {
}
}

impl<'a> EventSource for TcpListenerAccept<'a> {
impl EventSource for TcpListenerAccept<'_> {
fn subscribe(&mut self, co: CoroutineImpl) {
#[cfg(feature = "io_cancel")]
let cancel = co_cancel_data(&co);
Expand Down
2 changes: 1 addition & 1 deletion src/io/sys/unix/net/udp_recv_from.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl<'a> UdpRecvFrom<'a> {
}
}

impl<'a> EventSource for UdpRecvFrom<'a> {
impl EventSource for UdpRecvFrom<'_> {
fn subscribe(&mut self, co: CoroutineImpl) {
#[cfg(feature = "io_cancel")]
let cancel = co_cancel_data(&co);
Expand Down
2 changes: 1 addition & 1 deletion src/io/sys/unix/net/udp_send_to.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl<'a, A: ToSocketAddrs> UdpSendTo<'a, A> {
}
}

impl<'a, A: ToSocketAddrs> EventSource for UdpSendTo<'a, A> {
impl<A: ToSocketAddrs> EventSource for UdpSendTo<'_, A> {
fn subscribe(&mut self, co: CoroutineImpl) {
let io_data = self.io_data;

Expand Down
2 changes: 1 addition & 1 deletion src/io/sys/unix/net/unix_listener_accept.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl<'a> UnixListenerAccept<'a> {
}
}

impl<'a> EventSource for UnixListenerAccept<'a> {
impl EventSource for UnixListenerAccept<'_> {
fn subscribe(&mut self, co: CoroutineImpl) {
#[cfg(feature = "io_cancel")]
let cancel = co_cancel_data(&co);
Expand Down
2 changes: 1 addition & 1 deletion src/io/sys/unix/net/unix_recv_from.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl<'a> UnixRecvFrom<'a> {
}
}

impl<'a> EventSource for UnixRecvFrom<'a> {
impl EventSource for UnixRecvFrom<'_> {
fn subscribe(&mut self, co: CoroutineImpl) {
#[cfg(feature = "io_cancel")]
let cancel = co_cancel_data(&co);
Expand Down
2 changes: 1 addition & 1 deletion src/io/sys/unix/net/unix_send_to.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl<'a> UnixSendTo<'a> {
}
}

impl<'a> EventSource for UnixSendTo<'a> {
impl EventSource for UnixSendTo<'_> {
fn subscribe(&mut self, co: CoroutineImpl) {
let io_data = self.io_data;

Expand Down
2 changes: 1 addition & 1 deletion src/io/sys/unix/wait_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl<'a> RawIoBlock<'a> {
}
}

impl<'a> EventSource for RawIoBlock<'a> {
impl EventSource for RawIoBlock<'_> {
fn subscribe(&mut self, co: CoroutineImpl) {
#[cfg(feature = "io_cancel")]
let handle = co_get_handle(&co);
Expand Down
2 changes: 1 addition & 1 deletion src/os/unix/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ pub struct Incoming<'a> {
listener: &'a UnixListener,
}

impl<'a> Iterator for Incoming<'a> {
impl Iterator for Incoming<'_> {
type Item = io::Result<UnixStream>;

fn next(&mut self) -> Option<io::Result<UnixStream>> {
Expand Down

0 comments on commit 5ecd454

Please sign in to comment.