diff options
Diffstat (limited to 'melib/src/mailbox/thread.rs')
-rw-r--r-- | melib/src/mailbox/thread.rs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/melib/src/mailbox/thread.rs b/melib/src/mailbox/thread.rs index 9b6baf0a..0d72d6df 100644 --- a/melib/src/mailbox/thread.rs +++ b/melib/src/mailbox/thread.rs @@ -512,16 +512,14 @@ impl Threads { remove_from_parent!(thread_nodes, idx); remove_from_parent!(thread_nodes, child); return true; // Pruned - } else { - if let Some(p) = thread_nodes[idx].parent { - let orphans = thread_nodes[idx].children.clone(); - for c in orphans { - make!((p) parent of (c), thread_nodes); - } - remove_from_parent!(thread_nodes, idx); - thread_nodes[idx].children.clear(); - return true; // Pruned + } else if let Some(p) = thread_nodes[idx].parent { + let orphans = thread_nodes[idx].children.clone(); + for c in orphans { + make!((p) parent of (c), thread_nodes); } + remove_from_parent!(thread_nodes, idx); + thread_nodes[idx].children.clear(); + return true; // Pruned } } |