mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-28 16:50:37 +02:00
Suppress/fix clippy warnings
This commit is contained in:
@ -220,7 +220,7 @@ impl ServerBuilder {
|
||||
self.services.push(StreamNewService::create(
|
||||
name.as_ref().to_string(),
|
||||
token,
|
||||
factory.clone(),
|
||||
factory,
|
||||
addr,
|
||||
));
|
||||
self.sockets
|
||||
|
@ -91,7 +91,7 @@ impl ConfiguredService {
|
||||
|
||||
pub(super) fn stream(&mut self, token: Token, name: String, addr: net::SocketAddr) {
|
||||
self.names.insert(token, (name.clone(), addr));
|
||||
self.topics.insert(name.clone(), token);
|
||||
self.topics.insert(name, token);
|
||||
self.services.push(token);
|
||||
}
|
||||
}
|
||||
|
@ -315,6 +315,8 @@ enum WorkerState {
|
||||
impl Future for Worker {
|
||||
type Output = ();
|
||||
|
||||
// FIXME: remove this attribute
|
||||
#[allow(clippy::never_loop)]
|
||||
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
||||
// `StopWorker` message handler
|
||||
if let Poll::Ready(Some(StopCommand { graceful, result })) =
|
||||
@ -368,11 +370,8 @@ impl Future for Worker {
|
||||
Ok(false) => {
|
||||
// push connection back to queue
|
||||
if let Some(conn) = conn {
|
||||
match self.state {
|
||||
WorkerState::Unavailable(ref mut conns) => {
|
||||
conns.push(conn);
|
||||
}
|
||||
_ => (),
|
||||
if let WorkerState::Unavailable(ref mut conns) = self.state {
|
||||
conns.push(conn);
|
||||
}
|
||||
}
|
||||
Poll::Pending
|
||||
|
Reference in New Issue
Block a user