Skip to content

Commit 7c3de1a

Browse files
committed
recover impl Trait for resolve_locks*
Signed-off-by: iosmanthus <[email protected]>
1 parent 3a0df00 commit 7c3de1a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@
9292
//! # })}
9393
//! ```
9494
95-
#![feature(explicit_generic_args_with_impl_trait)]
9695
#[macro_use]
9796
pub mod request;
9897
#[macro_use]

src/transaction/lock.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ const RESOLVE_LOCK_RETRY_LIMIT: usize = 10;
2525
/// the key. We first use `CleanupRequest` to let the status of the primary lock converge and get
2626
/// its status (committed or rolled back). Then, we use the status of its primary lock to determine
2727
/// the status of the other keys in the same transaction.
28-
pub async fn resolve_locks<T: PdClient>(
28+
pub async fn resolve_locks(
2929
locks: Vec<kvrpcpb::LockInfo>,
30-
pd_client: Arc<T>,
30+
pd_client: Arc<impl PdClient>,
3131
) -> Result<bool> {
3232
debug!("resolving locks");
3333
let ts = pd_client.clone().get_timestamp().await?;
@@ -89,11 +89,11 @@ pub async fn resolve_locks<T: PdClient>(
8989
Ok(!has_live_locks)
9090
}
9191

92-
async fn resolve_lock_with_retry<T: PdClient>(
92+
async fn resolve_lock_with_retry(
9393
#[allow(clippy::ptr_arg)] key: &Vec<u8>,
9494
start_version: u64,
9595
commit_version: u64,
96-
pd_client: Arc<T>,
96+
pd_client: Arc<impl PdClient>,
9797
) -> Result<RegionVerId> {
9898
debug!("resolving locks with retry");
9999
// FIXME: Add backoff

0 commit comments

Comments
 (0)