From d560ac619782bb42046ea13606c85989e178d52a Mon Sep 17 00:00:00 2001 From: Tim Kuehn Date: Fri, 9 Aug 2019 01:07:31 -0700 Subject: [PATCH] Update to the latest rustc nightly. --- tarpc/examples/pubsub.rs | 10 +++++----- tarpc/examples/readme.rs | 2 +- tarpc/examples/server_calling_server.rs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tarpc/examples/pubsub.rs b/tarpc/examples/pubsub.rs index e12baaa..95c8874 100644 --- a/tarpc/examples/pubsub.rs +++ b/tarpc/examples/pubsub.rs @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. -#![feature(async_await, existential_type)] +#![feature(async_await, type_alias_impl_trait)] use futures::{ future::{self, Ready}, @@ -12,7 +12,7 @@ use futures::{ Future, }; use publisher::Publisher as _; -use rpc::{ +use tarpc::{ client, context, server::{self, Handler}, }; @@ -87,7 +87,7 @@ impl Publisher { } impl publisher::Publisher for Publisher { - existential type BroadcastFut: Future; + type BroadcastFut = impl Future; fn broadcast(self, _: context::Context, message: String) -> Self::BroadcastFut { async fn broadcast( @@ -106,7 +106,7 @@ impl publisher::Publisher for Publisher { broadcast(self.clients.clone(), message) } - existential type SubscribeFut: Future>; + type SubscribeFut = impl Future>; fn subscribe(self, _: context::Context, id: u32, addr: SocketAddr) -> Self::SubscribeFut { async fn subscribe( @@ -125,7 +125,7 @@ impl publisher::Publisher for Publisher { subscribe(Arc::clone(&self.clients), id, addr).map_err(|e| e.to_string()) } - existential type UnsubscribeFut: Future; + type UnsubscribeFut = impl Future; fn unsubscribe(self, _: context::Context, id: u32) -> Self::UnsubscribeFut { eprintln!("Unsubscribing {}", id); diff --git a/tarpc/examples/readme.rs b/tarpc/examples/readme.rs index ef073b4..ba8cf2f 100644 --- a/tarpc/examples/readme.rs +++ b/tarpc/examples/readme.rs @@ -10,7 +10,7 @@ use futures::{ future::{self, Ready}, prelude::*, }; -use rpc::{ +use tarpc::{ client, context, server::{BaseChannel, Channel}, }; diff --git a/tarpc/examples/server_calling_server.rs b/tarpc/examples/server_calling_server.rs index b53965b..46e1c06 100644 --- a/tarpc/examples/server_calling_server.rs +++ b/tarpc/examples/server_calling_server.rs @@ -4,14 +4,14 @@ // license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. -#![feature(existential_type, async_await)] +#![feature(async_await, type_alias_impl_trait)] use crate::{add::Add as AddService, double::Double as DoubleService}; use futures::{ future::{self, Ready}, prelude::*, }; -use rpc::{ +use tarpc::{ client, context, server::{Handler, Server}, }; @@ -50,7 +50,7 @@ struct DoubleServer { } impl DoubleService for DoubleServer { - existential type DoubleFut: Future> + Send; + type DoubleFut = impl Future> + Send; fn double(self, _: context::Context, x: i32) -> Self::DoubleFut { async fn double(mut client: add::AddClient, x: i32) -> Result {