Shifts a ROOT-placeholder leaf identity.
(leaf: &mut LeafOp, leaf_base: u32)
| 518 | |
| 519 | /// Shifts a ROOT-placeholder leaf identity. |
| 520 | fn renumber_placeholder_leaf(leaf: &mut LeafOp, leaf_base: u32) { |
| 521 | match leaf { |
| 522 | LeafOp::Insert { after, .. } => { |
| 523 | if let Some(after) = after { |
| 524 | if after.change_id().is_root() { |
| 525 | *after = LeafId::new(after.change_id(), leaf_base + after.leaf_idx()); |
| 526 | } |
| 527 | } |
| 528 | } |
| 529 | LeafOp::Delete { .. } | LeafOp::Replace { .. } | LeafOp::Restore { .. } => {} |
| 530 | } |
| 531 | } |
| 532 | |
| 533 | impl fmt::Display for FileOps { |
| 534 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
no test coverage detected