Fix warnings: dyn

This commit is contained in:
adria0
2020-07-29 10:36:15 +02:00
committed by Artem Vorotnikov
parent 4adb44155d
commit 1700873f48
198 changed files with 1180 additions and 1072 deletions

View File

@@ -286,7 +286,7 @@ impl Client {
}
impl Fetch for Client {
type Result = Box<Future<Item = Response, Error = Error> + Send + 'static>;
type Result = Box<dyn Future<Item = Response, Error = Error> + Send + 'static>;
fn fetch(&self, request: Request, abort: Abort) -> Self::Result {
debug!(target: "fetch", "fetching: {:?}", request.url());
@@ -649,7 +649,7 @@ impl ::std::error::Error for Error {
fn description(&self) -> &str {
"Fetch client error"
}
fn cause(&self) -> Option<&::std::error::Error> {
fn cause(&self) -> Option<&dyn std::error::Error> {
None
}
}
@@ -938,7 +938,7 @@ mod test {
type ResBody = hyper::Body;
type Error = Error;
type Future = Box<
Future<Item = hyper::Response<Self::ResBody>, Error = Self::Error> + Send + 'static,
dyn Future<Item = hyper::Response<Self::ResBody>, Error = Self::Error> + Send + 'static,
>;
fn call(&mut self, req: hyper::Request<hyper::Body>) -> Self::Future {