chore(lib): add dyn keyword to trait objects (#1820)
Requires Rust 1.27.
This commit is contained in:
@@ -186,15 +186,15 @@ impl ChunkedState {
|
||||
trace!("Read chunk hex size");
|
||||
let radix = 16;
|
||||
match byte!(rdr) {
|
||||
b @ b'0'...b'9' => {
|
||||
b @ b'0'..=b'9' => {
|
||||
*size *= radix;
|
||||
*size += (b - b'0') as u64;
|
||||
}
|
||||
b @ b'a'...b'f' => {
|
||||
b @ b'a'..=b'f' => {
|
||||
*size *= radix;
|
||||
*size += (b + 10 - b'a') as u64;
|
||||
}
|
||||
b @ b'A'...b'F' => {
|
||||
b @ b'A'..=b'F' => {
|
||||
*size *= radix;
|
||||
*size += (b + 10 - b'A') as u64;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
use std::error::Error as StdError;
|
||||
|
||||
use bytes::{Buf, Bytes};
|
||||
use futures::{Async, Future, Poll, Stream};
|
||||
use http::{Request, Response, StatusCode};
|
||||
@@ -44,7 +46,7 @@ type ClientRx<B> = ::client::dispatch::Receiver<Request<B>, Response<Body>>;
|
||||
impl<D, Bs, I, T> Dispatcher<D, Bs, I, T>
|
||||
where
|
||||
D: Dispatch<PollItem=MessageHead<T::Outgoing>, PollBody=Bs, RecvItem=MessageHead<T::Incoming>>,
|
||||
D::PollError: Into<Box<::std::error::Error + Send + Sync>>,
|
||||
D::PollError: Into<Box<dyn StdError + Send + Sync>>,
|
||||
I: AsyncRead + AsyncWrite,
|
||||
T: Http1Transaction,
|
||||
Bs: Payload,
|
||||
@@ -334,7 +336,7 @@ where
|
||||
impl<D, Bs, I, T> Future for Dispatcher<D, Bs, I, T>
|
||||
where
|
||||
D: Dispatch<PollItem=MessageHead<T::Outgoing>, PollBody=Bs, RecvItem=MessageHead<T::Incoming>>,
|
||||
D::PollError: Into<Box<::std::error::Error + Send + Sync>>,
|
||||
D::PollError: Into<Box<dyn StdError + Send + Sync>>,
|
||||
I: AsyncRead + AsyncWrite,
|
||||
T: Http1Transaction,
|
||||
Bs: Payload,
|
||||
@@ -365,7 +367,7 @@ impl<S> Server<S> where S: Service {
|
||||
impl<S, Bs> Dispatch for Server<S>
|
||||
where
|
||||
S: Service<ReqBody=Body, ResBody=Bs>,
|
||||
S::Error: Into<Box<::std::error::Error + Send + Sync>>,
|
||||
S::Error: Into<Box<dyn StdError + Send + Sync>>,
|
||||
Bs: Payload,
|
||||
{
|
||||
type PollItem = MessageHead<StatusCode>;
|
||||
|
||||
@@ -717,7 +717,7 @@ impl Client {
|
||||
101 => {
|
||||
return Ok(Some((DecodedLength::ZERO, true)));
|
||||
},
|
||||
100...199 => {
|
||||
100..=199 => {
|
||||
trace!("ignoring informational response: {}", inc.subject.as_u16());
|
||||
return Ok(None);
|
||||
},
|
||||
@@ -729,7 +729,7 @@ impl Client {
|
||||
Some(Method::HEAD) => {
|
||||
return Ok(Some((DecodedLength::ZERO, false)));
|
||||
}
|
||||
Some(Method::CONNECT) => if let 200...299 = inc.subject.as_u16() {
|
||||
Some(Method::CONNECT) => if let 200..=299 = inc.subject.as_u16() {
|
||||
return Ok(Some((DecodedLength::ZERO, true)));
|
||||
}
|
||||
Some(_) => {},
|
||||
|
||||
Reference in New Issue
Block a user