mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-26 19:47:43 +02:00
clippy warnings
This commit is contained in:
@ -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(()))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ where
|
||||
}
|
||||
}
|
||||
Ok(Async::NotReady) => Ok(Async::Ready(())),
|
||||
Err(_) => panic!(),
|
||||
Err(_e) => panic!(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user