diff --git a/crates/clash-verge-draft/src/lib.rs b/crates/clash-verge-draft/src/lib.rs index c1cba8f59..a26f1513b 100644 --- a/crates/clash-verge-draft/src/lib.rs +++ b/crates/clash-verge-draft/src/lib.rs @@ -6,8 +6,8 @@ type DraftInner = (SharedDraft, Option>); /// Draft 管理:committed 与 optional draft 都以 Arc> 存储, // (committed_snapshot, optional_draft_snapshot) -#[derive(Debug, Clone)] -pub struct Draft { +#[derive(Debug)] +pub struct Draft { inner: Arc>>, } @@ -90,3 +90,11 @@ impl Draft { Ok(res) } } + +impl Clone for Draft { + fn clone(&self) -> Self { + Self { + inner: Arc::clone(&self.inner), + } + } +}