From 59b0e0e74ec1290a3e9214fb367cdbfb76e824fa Mon Sep 17 00:00:00 2001 From: julianbraha Date: Thu, 29 Aug 2024 14:12:26 +0100 Subject: [PATCH] Only use .cloned() on the element instead of the entire iterator --- src/shell/layout/tiling/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shell/layout/tiling/mod.rs b/src/shell/layout/tiling/mod.rs index ff32a950..3a05e6f0 100644 --- a/src/shell/layout/tiling/mod.rs +++ b/src/shell/layout/tiling/mod.rs @@ -1432,7 +1432,7 @@ impl TilingLayout { group.remove_window(position); } else { 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| { tree.children_ids(parent_id).unwrap().position(|i| i == &id) }); @@ -2984,8 +2984,8 @@ impl TilingLayout { let child_id = tree .children_ids(&node_id) .unwrap() - .cloned() .next() + .cloned() .unwrap(); tree.remove_node(node_id, RemoveBehavior::LiftChildren) .unwrap();