chore(lib): add dyn keyword to trait objects (#1820)
Requires Rust 1.27.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#![deny(warnings)]
|
||||
extern crate futures;
|
||||
extern crate hyper;
|
||||
|
||||
@@ -12,7 +13,7 @@ use hyper::{Body, Method, Request, Response, Server, StatusCode};
|
||||
///
|
||||
/// A boxed Future (trait object) is used as it is easier to understand
|
||||
/// and extend with more types. Advanced users could switch to `Either`.
|
||||
type BoxFut = Box<Future<Item = Response<Body>, Error = hyper::Error> + Send>;
|
||||
type BoxFut = Box<dyn Future<Item = Response<Body>, Error = hyper::Error> + Send>;
|
||||
|
||||
/// This is our service handler. It receives a Request, routes on its
|
||||
/// path, and returns a Future of a Response.
|
||||
|
||||
Reference in New Issue
Block a user