From df15ef40f629e67726c416a798d41ce536a61604 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Fri, 29 Jan 2021 20:47:22 +0000 Subject: [PATCH] fmt --- actix-rt/src/system.rs | 2 -- actix-rt/src/worker.rs | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/actix-rt/src/system.rs b/actix-rt/src/system.rs index 7a39e877..d26fa1d7 100644 --- a/actix-rt/src/system.rs +++ b/actix-rt/src/system.rs @@ -29,7 +29,6 @@ pub struct System { worker_handle: WorkerHandle, } - impl System { /// Create a new system. /// @@ -151,7 +150,6 @@ pub struct SystemRunner { impl SystemRunner { /// Starts event loop and will return once [System] is [stopped](System::stop). pub fn run(self) -> io::Result<()> { - let SystemRunner { rt, stop_rx, .. } = self; // run loop diff --git a/actix-rt/src/worker.rs b/actix-rt/src/worker.rs index 40e3c3a1..b7925252 100644 --- a/actix-rt/src/worker.rs +++ b/actix-rt/src/worker.rs @@ -45,7 +45,6 @@ pub struct WorkerHandle { sender: mpsc::UnboundedSender, } - impl WorkerHandle { pub(crate) fn new(sender: mpsc::UnboundedSender) -> Self { Self { sender } @@ -103,6 +102,7 @@ impl Worker { /// /// # Panics /// Panics if a [System] is not registered on the current thread. + #[allow(clippy::new_without_default)] pub fn new() -> Worker { let id = COUNT.fetch_add(1, Ordering::Relaxed); let name = format!("actix-rt:worker:{}", id); @@ -266,15 +266,12 @@ struct WorkerRunner { rx: mpsc::UnboundedReceiver, } - impl Future for WorkerRunner { type Output = (); fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { - // process all items currently buffered in channel loop { - match ready!(Pin::new(&mut self.rx).poll_recv(cx)) { // channel closed; no more messages can be received None => return Poll::Ready(()),