diff --git a/tikv-client-store/src/client.rs b/tikv-client-store/src/client.rs index 709886e..bdf0310 100644 --- a/tikv-client-store/src/client.rs +++ b/tikv-client-store/src/client.rs @@ -28,9 +28,9 @@ pub struct TikvConnect { } impl KvConnect for TikvConnect { - type KvClient = impl KvClient + Clone + Send + Sync + 'static; + type KvClient = KvRpcClient; - fn connect(&self, address: &str) -> Result { + fn connect(&self, address: &str) -> Result { self.security_mgr .connect(self.env.clone(), address, TikvClient::new) .map(|c| KvRpcClient::new(Arc::new(c), self.timeout)) @@ -45,7 +45,7 @@ pub trait KvClient { /// This client handles requests for a single TiKV node. It converts the data /// types and abstractions of the client program into the grpc data types. #[derive(new, Clone)] -struct KvRpcClient { +pub struct KvRpcClient { rpc_client: Arc, timeout: Duration, } diff --git a/tikv-client-store/src/lib.rs b/tikv-client-store/src/lib.rs index d00ab9e..91ece20 100644 --- a/tikv-client-store/src/lib.rs +++ b/tikv-client-store/src/lib.rs @@ -1,5 +1,4 @@ // Copyright 2018 TiKV Project Authors. Licensed under Apache-2.0. -#![feature(type_alias_impl_trait)] #[macro_use] extern crate log;