Fix deleting layers (#1441)

* Fix deleting layers

* Code review comments
This commit is contained in:
0HyperCube
2023-10-25 23:20:55 +01:00
committed by GitHub
parent 2feef62f23
commit 9b034a5194
7 changed files with 77 additions and 29 deletions

View File

@@ -77,7 +77,7 @@ impl DocumentMetadata {
self.structure.entry(node_identifier).or_default()
}
pub fn shallowest_unique_layers<'a>(&self, layers: impl Iterator<Item = &'a LayerNodeIdentifier>) -> Vec<Vec<LayerNodeIdentifier>> {
pub fn shallowest_unique_layers(&self, layers: impl Iterator<Item = LayerNodeIdentifier>) -> Vec<Vec<LayerNodeIdentifier>> {
let mut sorted_layers = layers
.map(|layer| {
let mut layer_path = layer.ancestors(self).collect::<Vec<_>>();