summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-01-08 23:11:41 +0100
committerGitHub <noreply@github.com>2018-01-08 23:11:41 +0100
commitab788053129f0ac214a79c98ddb398bf99a1d973 (patch)
tree51021b9f17173f69e6811c4a7e3832d0ab0a2ed7
parent5e8feca6bb403c29753486d68b99c77b43ca7913 (diff)
parent689310edfe29236b87937c99a5b742491fd76826 (diff)
downloadimag-ab788053129f0ac214a79c98ddb398bf99a1d973.zip
imag-ab788053129f0ac214a79c98ddb398bf99a1d973.tar.gz
Merge pull request #1207 from matthiasbeyer/libimagstore-retrievecopy-rename
Rename `Store::retrieve_copy` to `Store::get_copy`
-rw-r--r--doc/src/09020-changelog.md3
-rw-r--r--lib/core/libimagstore/src/store.rs5
2 files changed, 5 insertions, 3 deletions
diff --git a/doc/src/09020-changelog.md b/doc/src/09020-changelog.md
index ae043b7..cf1a195 100644
--- a/doc/src/09020-changelog.md
+++ b/doc/src/09020-changelog.md
@@ -26,6 +26,9 @@ This section contains the changelog from the last release to the next release.
* `imag-log` was introduced
* `imag-init` was introduced
* `libimagdiary` supports second-granularity now.
+ * `libimagstore::store::Store::retrieve_copy` was renamed to
+ `libimagstore::store::Store::get_copy`, which describes the semantics of
+ the function way better.
* Minor changes
* Internals were refactored from `match`ing all the things into function
chaining
diff --git a/lib/core/libimagstore/src/store.rs b/lib/core/libimagstore/src/store.rs
index 400e8be..0517083 100644
--- a/lib/core/libimagstore/src/store.rs
+++ b/lib/core/libimagstore/src/store.rs
@@ -502,8 +502,7 @@ impl Store {
Ok(())
}
- /// Retrieve a copy of a given entry, this cannot be used to mutate
- /// the one on disk
+ /// Get a copy of a given entry, this cannot be used to mutate the one on disk
///
/// # Return value
///
@@ -514,7 +513,7 @@ impl Store {
/// - RetrieveCopyCallError(IdLocked()) if the Entry is borrowed currently
/// - Errors StoreEntry::new() might return
///
- pub fn retrieve_copy<S: IntoStoreId>(&self, id: S) -> Result<Entry> {
+ pub fn get_copy<S: IntoStoreId>(&self, id: S) -> Result<Entry> {
let id = id.into_storeid()?.with_base(self.path().clone());
debug!("Retrieving copy of '{}'", id);
let entries = self.entries.write()