Only use .cloned() on the element instead of the entire iterator
This commit is contained in:
parent
06d25df4ef
commit
59b0e0e74e
1 changed files with 2 additions and 2 deletions
|
|
@ -1432,7 +1432,7 @@ impl TilingLayout {
|
||||||
group.remove_window(position);
|
group.remove_window(position);
|
||||||
} else {
|
} else {
|
||||||
trace!("Removing Group");
|
trace!("Removing Group");
|
||||||
let other_child = tree.children_ids(&id).unwrap().cloned().next().unwrap();
|
let other_child = tree.children_ids(&id).unwrap().next().cloned().unwrap();
|
||||||
let fork_pos = parent_parent_id.as_ref().and_then(|parent_id| {
|
let fork_pos = parent_parent_id.as_ref().and_then(|parent_id| {
|
||||||
tree.children_ids(parent_id).unwrap().position(|i| i == &id)
|
tree.children_ids(parent_id).unwrap().position(|i| i == &id)
|
||||||
});
|
});
|
||||||
|
|
@ -2984,8 +2984,8 @@ impl TilingLayout {
|
||||||
let child_id = tree
|
let child_id = tree
|
||||||
.children_ids(&node_id)
|
.children_ids(&node_id)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.cloned()
|
|
||||||
.next()
|
.next()
|
||||||
|
.cloned()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
tree.remove_node(node_id, RemoveBehavior::LiftChildren)
|
tree.remove_node(node_id, RemoveBehavior::LiftChildren)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue