From 294b1bea13a595bc468122f0e633d6ed872973aa Mon Sep 17 00:00:00 2001 From: appflowy Date: Thu, 8 Sep 2022 16:58:37 +0800 Subject: [PATCH] refactor: remove Box in DocumentOperation --- shared-lib/lib-ot/src/core/document/position.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shared-lib/lib-ot/src/core/document/position.rs b/shared-lib/lib-ot/src/core/document/position.rs index 5be8fb4401..54ead9c28a 100644 --- a/shared-lib/lib-ot/src/core/document/position.rs +++ b/shared-lib/lib-ot/src/core/document/position.rs @@ -9,6 +9,12 @@ impl std::ops::Deref for Path { } } +impl AsRef for usize { + fn as_ref(&self) -> &Path { + todo!() + } +} + impl Path { // delta is default to be 1 pub fn transform(pre_insert_path: &Path, b: &Path, offset: i64) -> Path {