Remove use of unstable feature

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron 2020-10-29 14:57:14 +13:00
parent d2f2373499
commit 31a9c02b58
2 changed files with 3 additions and 4 deletions

View File

@ -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<Self::KvClient> {
fn connect(&self, address: &str) -> Result<KvRpcClient> {
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<TikvClient>,
timeout: Duration,
}

View File

@ -1,5 +1,4 @@
// Copyright 2018 TiKV Project Authors. Licensed under Apache-2.0.
#![feature(type_alias_impl_trait)]
#[macro_use]
extern crate log;