Convert to the serializable `change::ops::FileOps` type.
(&self)
| 106 | |
| 107 | /// Convert to the serializable `change::ops::FileOps` type. |
| 108 | pub fn to_change_ops(&self) -> change_ops::FileOps { |
| 109 | let mut result = |
| 110 | change_ops::FileOps::new(self.trunk_id, self.path.clone(), self.trunk_op.clone()); |
| 111 | |
| 112 | for line_op in &self.line_ops { |
| 113 | let change_line_op = |
| 114 | change_ops::LineOps::new(line_op.branch_id(), line_op.operation().clone()); |
| 115 | result.add_line_op(change_line_op); |
| 116 | } |
| 117 | |
| 118 | result |
| 119 | } |
| 120 | |
| 121 | /// Consume and convert to the serializable `change::ops::FileOps` type. |
| 122 | pub fn into_change_ops(self) -> change_ops::FileOps { |
nothing calls this directly
no test coverage detected