chore(lib): add dyn keyword to trait objects (#1820)

Requires Rust 1.27.
This commit is contained in:
Sean McArthur
2019-06-03 13:08:13 -07:00
committed by GitHub
parent e0f5a9c6c5
commit 01c03db7ea
28 changed files with 107 additions and 94 deletions

View File

@@ -1779,7 +1779,7 @@ impl Serve {
}
}
type BoxError = Box<::std::error::Error + Send + Sync>;
type BoxError = Box<dyn std::error::Error + Send + Sync>;
struct ReplyBuilder<'a> {
tx: &'a spmc::Sender<Reply>,
@@ -1853,7 +1853,7 @@ enum Msg {
}
impl TestService {
fn call(&self, req: Request<Body>) -> Box<Future<Item=Response<Body>, Error=BoxError> + Send> {
fn call(&self, req: Request<Body>) -> Box<dyn Future<Item=Response<Body>, Error=BoxError> + Send> {
let tx1 = self.tx.clone();
let tx2 = self.tx.clone();
let replies = self.reply.clone();