diff --git a/lib/src/operation.rs b/lib/src/operation.rs index 896ab8ce2..8f09e8142 100644 --- a/lib/src/operation.rs +++ b/lib/src/operation.rs @@ -27,7 +27,7 @@ use crate::view::View; pub struct Operation { op_store: Arc, id: OperationId, - data: op_store::Operation, + data: Arc, // allow cheap clone } impl Debug for Operation { @@ -63,8 +63,16 @@ impl Hash for Operation { } impl Operation { - pub fn new(op_store: Arc, id: OperationId, data: op_store::Operation) -> Self { - Operation { op_store, id, data } + pub fn new( + op_store: Arc, + id: OperationId, + data: impl Into>, + ) -> Self { + Operation { + op_store, + id, + data: data.into(), + } } pub fn op_store(&self) -> Arc {