derive clone for endpoint
@@ -40,6 +40,7 @@ use txn_types::Lock;
const LIGHT_TASK_THRESHOLD: Duration = Duration::from_millis(5);
/// A pool to build and run Coprocessor request handlers.
+#[derive(Clone)]
pub struct Endpoint<E: Engine> {
/// The thread pool to run Coprocessor requests.
read_pool: ReadPoolHandle,
@@ -69,17 +70,6 @@ pub struct Endpoint<E: Engine> {
_phantom: PhantomData<E>,
}
-impl<E: Engine> Clone for Endpoint<E> {
- fn clone(&self) -> Self {
- Self {
- read_pool: self.read_pool.clone(),
- semaphore: self.semaphore.clone(),
- concurrency_manager: self.concurrency_manager.clone(),
- ..*self
- }
- }
-}
-
impl<E: Engine> tikv_util::AssertSend for Endpoint<E> {}
impl<E: Engine> Endpoint<E> {
