summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-02-21 19:33:23 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-02-21 19:33:23 +0100
commit2aa09879cc7a7d61efde85658520b5bd7a8a8872 (patch)
treedf41881529503c3c1baf3440187d8ac782567428
parentd2bd467d59c4d2e02c20241d0cddaa804ce8ae5a (diff)
Collect so that all FLEs are dropped
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--bin/domain/imag-mail/src/lib.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/domain/imag-mail/src/lib.rs b/bin/domain/imag-mail/src/lib.rs
index c0125751..f9bc966a 100644
--- a/bin/domain/imag-mail/src/lib.rs
+++ b/bin/domain/imag-mail/src/lib.rs
@@ -215,11 +215,18 @@ fn list(rt: &Runtime) -> Result<()> {
drop(fle);
id
})
- .and_then_ok(|id: String| mailstore.get_mailtree(&id))
+
+ // we have to collect here, so that all FLEs are drop()ed
+ .collect::<Result<Vec<String>>>()?
+ .into_iter()
+ .map(|id: String| mailstore.get_mailtree(&id))
.collect::<Result<Vec<Mailtree>>>()
} else {
iter.and_then_ok(|fle| fle.get_cached_id())
- .and_then_ok(|id: String| mailstore.get_mailtree(&id))
+ // we have to collect here, so that all FLEs are drop()ed
+ .collect::<Result<Vec<String>>>()?
+ .into_iter()
+ .map(|id: String| mailstore.get_mailtree(&id))
.collect::<Result<Vec<Mailtree>>>()
}?;