1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-26 15:07:43 +02:00

remove unnecessary Pin in poll_recv calls (#475)

This commit is contained in:
Juan Aguilar Santillana
2023-01-02 14:36:46 +01:00
committed by GitHub
parent d973d5974a
commit dde38bbe06
5 changed files with 7 additions and 9 deletions

View File

@ -303,7 +303,7 @@ impl Future for ArbiterRunner {
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
// process all items currently buffered in channel
loop {
match ready!(Pin::new(&mut self.rx).poll_recv(cx)) {
match ready!(self.rx.poll_recv(cx)) {
// channel closed; no more messages can be received
None => return Poll::Ready(()),

View File

@ -292,7 +292,7 @@ impl Future for SystemController {
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
// process all items currently buffered in channel
loop {
match ready!(Pin::new(&mut self.cmd_rx).poll_recv(cx)) {
match ready!(self.cmd_rx.poll_recv(cx)) {
// channel closed; no more messages can be received
None => return Poll::Ready(()),