Shifts a ROOT-placeholder leaf identity.
(leaf: &mut LeafOp, leaf_base: u32)
| 533 | |
| 534 | /// Shifts a ROOT-placeholder leaf identity. |
| 535 | fn renumber_placeholder_leaf(leaf: &mut LeafOp, leaf_base: u32) { |
| 536 | match leaf { |
| 537 | LeafOp::Insert { after, .. } => { |
| 538 | if let Some(after) = after { |
| 539 | if after.change_id().is_root() { |
| 540 | *after = LeafId::new(after.change_id(), leaf_base + after.leaf_idx()); |
| 541 | } |
| 542 | } |
| 543 | } |
| 544 | LeafOp::Delete { .. } | LeafOp::Replace { .. } | LeafOp::Restore { .. } => {} |
| 545 | } |
| 546 | } |
| 547 | |
| 548 | impl fmt::Display for FileOps { |
| 549 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
no test coverage detected