summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-02-28 11:37:13 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-06-01 13:58:07 +0200
commit2a0357e325db162acbbb5fad7f1ce22d6de309a2 (patch)
treecfc5bc292e1606d98e9dc3755f1cc81364a083de
parentc6c9739d2ebea3acd6ed3b9c64a9d79dff71b16f (diff)
Remove sanity-check
This check was added during development. It sanity-checks whether an Entry was already borrowed in the store and ignores that entry then in the iteration. Of course, just ignoring is not a nice thing as it might hide things that are expected in the iteration. Thus, remove this sanity check here. This is an individual commit because we might need to see this in the history, so that we can revert this commit if need be. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--lib/domain/libimagmail/src/mailtree.rs15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/domain/libimagmail/src/mailtree.rs b/lib/domain/libimagmail/src/mailtree.rs
index 2e831e33..3b7ca745 100644
--- a/lib/domain/libimagmail/src/mailtree.rs
+++ b/lib/domain/libimagmail/src/mailtree.rs
@@ -17,8 +17,6 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
-use std::path::PathBuf;
-
use failure::Fallible as Result;
use failure::ResultExt;
use indextree::Arena;
@@ -26,8 +24,6 @@ use indextree::NodeId;
use indextree::Node;
use itertools::Itertools;
-use libimagstore::storeid::StoreId;
-
use crate::store::MailStoreWithConnection;
use crate::mail::Mail;
use crate::mail::LoadedMail;
@@ -111,17 +107,6 @@ fn fill_arena_with<'a>(arena: &mut Arena<String>, store: &'a MailStoreWithConnec
.into_iter()
.map(|id: String| {
trace!("Trying to get: {:?}", id);
-
- {
- let sid = StoreId::new(PathBuf::from(id.clone()))?;
- if store.is_borrowed(sid.clone())? {
- trace!("Entry is already borrowed, returning");
- return Ok(())
- }
-
- trace!("Seems not to be borrowed: {:?}", sid);
- }
-
let mail = store.get_mail_by_id(&id)
.context("Getting mail by id")?
.ok_or_else(|| format_err!("Cannot find mail for id {}", id))?;