diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-02-22 16:53:19 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-02-22 16:53:19 +0100 |
commit | ded59c4ce9291ec272b75be19626adbb4b0999f0 (patch) | |
tree | 493ea75ea231dc8cfe8f016d911a1d80053212c3 | |
parent | 245877ff9cc0792a70b44353d160c14ed8174099 (diff) |
Ignore root id here
-rw-r--r-- | lib/domain/libimagmail/src/mailtree.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/domain/libimagmail/src/mailtree.rs b/lib/domain/libimagmail/src/mailtree.rs index c5c96bd2..9b72ac6d 100644 --- a/lib/domain/libimagmail/src/mailtree.rs +++ b/lib/domain/libimagmail/src/mailtree.rs @@ -64,7 +64,7 @@ fn fill_arena_with<'a>(arena: &mut Arena<String>, store: &'a MailStoreWithConnec let root_id = root.get_id().clone(); trace!("root_id = {:?}", root_id); - let root_node = arena.new_node(root_id); + let root_node = arena.new_node(root_id.clone()); trace!("root_node = {:?}", root_node); let root_thread_id = root.get_thread_id().to_owned(); @@ -97,6 +97,7 @@ fn fill_arena_with<'a>(arena: &mut Arena<String>, store: &'a MailStoreWithConnec }) .flat_map(|v| v.into_iter()) .unique() + .filter(|id| *id != root_id) .map(Ok) .collect::<Result<Vec<String>>>(); |