Creates a line insert operation with leaf operations.
(branch_id: BranchId, after: Option<BranchId>, leaf_ops: Vec<LeafOp>)
| 50 | |
| 51 | /// Creates a line insert operation with leaf operations. |
| 52 | pub fn insert(branch_id: BranchId, after: Option<BranchId>, leaf_ops: Vec<LeafOp>) -> Self { |
| 53 | Self { |
| 54 | branch_id, |
| 55 | operation: BranchOp::Insert { |
| 56 | after, |
| 57 | content: leaf_ops, |
| 58 | }, |
| 59 | token_ops: Vec::new(), |
| 60 | old_line_num: None, |
| 61 | new_line_num: None, |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | /// Creates a line delete operation with original content. |
| 66 | /// |
no outgoing calls
no test coverage detected