diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-03-24 22:59:04 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-06-01 14:00:20 +0200 |
commit | d53d0938cf8d06b3649643f58ca16d3cb0d37f4c (patch) | |
tree | e4df0251e86bfc25e25f1c057eed5c5b72129cc8 | |
parent | 5640d4c0c070f1b32483a0d483ee8f65544888ba (diff) |
Fix: Rename to match naming scheme
"create" should be used for a function that tries to create an entry,
but fails if it already exists. "retrieve" is used for a function that
creates an entry if necessary.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | lib/domain/libimagmail/src/store.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/domain/libimagmail/src/store.rs b/lib/domain/libimagmail/src/store.rs index 6a729dcf..262af9cd 100644 --- a/lib/domain/libimagmail/src/store.rs +++ b/lib/domain/libimagmail/src/store.rs @@ -75,7 +75,7 @@ impl<'a> MailStoreWithConnection<'a> { query .search_messages()? .map(|message| { - let mut entry = self.create_entry_for_id(message.id())?; + let mut entry = self.retrieve_entry_for_id(message.id())?; if let Some(tag_as_mail) = tag_as_mail.as_ref() { entry.add_tag(tag_as_mail.clone())?; } @@ -124,7 +124,7 @@ impl<'a> MailStoreWithConnection<'a> { self.get_entry_for_id(Cow::from(id)) } - fn create_entry_for_id(&self, id: Cow<str>) -> Result<FileLockEntry<'a>> { + fn retrieve_entry_for_id(&self, id: Cow<str>) -> Result<FileLockEntry<'a>> { let sid = crate::module_path::new_id(id.as_ref())?; self.store .retrieve(sid) |