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

clippy warnings

This commit is contained in:
Nikolay Kim
2019-02-04 11:04:10 -08:00
parent 7dca264546
commit 08bc328826
8 changed files with 21 additions and 8 deletions

View File

@ -61,9 +61,9 @@ where
fn poll_ready(&mut self) -> Poll<(), Self::Error> {
if !self.count.available() {
log::trace!("InFlight limit exceeded");
return Ok(Async::NotReady);
Ok(Async::NotReady)
} else {
return Ok(Async::Ready(()));
Ok(Async::Ready(()))
}
}

View File

@ -112,7 +112,7 @@ where
}
}
Ok(Async::NotReady) => Ok(Async::Ready(())),
Err(_) => panic!(),
Err(_e) => panic!(),
}
}

View File

@ -115,6 +115,18 @@ where
}
}
impl<S> Default for InOrderService<S>
where
S: Service,
S::Response: 'static,
S::Future: 'static,
S::Error: 'static,
{
fn default() -> Self {
Self::new()
}
}
impl<S> Transform<S> for InOrderService<S>
where
S: Service,

View File

@ -133,7 +133,7 @@ impl SystemTimeService {
/// Get current time. This function has to be called from
/// future's poll method, otherwise it panics.
pub fn now(&self) -> time::SystemTime {
let cur = self.0.get_ref().current.clone();
let cur = self.0.get_ref().current;
if let Some(cur) = cur {
cur
} else {