Creates a line modify operation (old content → new content). This is the canonical representation for a modified line. Carries both old and new content so every consumer can render word-level diffs without heuristic re-pairing.
(branch_id: BranchId, old_content: Vec<LeafOp>, new_content: Vec<LeafOp>)
| 115 | /// both old and new content so every consumer can render word-level |
| 116 | /// diffs without heuristic re-pairing. |
| 117 | pub fn modify(branch_id: BranchId, old_content: Vec<LeafOp>, new_content: Vec<LeafOp>) -> Self { |
| 118 | Self { |
| 119 | branch_id, |
| 120 | operation: BranchOp::Modify { |
| 121 | branch: branch_id, |
| 122 | old_content, |
| 123 | new_content, |
| 124 | }, |
| 125 | token_ops: Vec::new(), |
| 126 | old_line_num: None, |
| 127 | new_line_num: None, |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | /// Returns `true` if this is a delete operation. |
| 132 | #[inline] |
nothing calls this directly
no outgoing calls
no test coverage detected