Merge pull request #1207 from matthiasbeyer/libimagstore-retrievecopy-rename
Rename `Store::retrieve_copy` to `Store::get_copy`
This commit is contained in:
commit
ab78805312
2 changed files with 5 additions and 3 deletions
|
@ -26,6 +26,9 @@ This section contains the changelog from the last release to the next release.
|
||||||
* `imag-log` was introduced
|
* `imag-log` was introduced
|
||||||
* `imag-init` was introduced
|
* `imag-init` was introduced
|
||||||
* `libimagdiary` supports second-granularity now.
|
* `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
|
* Minor changes
|
||||||
* Internals were refactored from `match`ing all the things into function
|
* Internals were refactored from `match`ing all the things into function
|
||||||
chaining
|
chaining
|
||||||
|
|
|
@ -502,8 +502,7 @@ impl Store {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Retrieve a copy of a given entry, this cannot be used to mutate
|
/// Get a copy of a given entry, this cannot be used to mutate the one on disk
|
||||||
/// the one on disk
|
|
||||||
///
|
///
|
||||||
/// # Return value
|
/// # Return value
|
||||||
///
|
///
|
||||||
|
@ -514,7 +513,7 @@ impl Store {
|
||||||
/// - RetrieveCopyCallError(IdLocked()) if the Entry is borrowed currently
|
/// - RetrieveCopyCallError(IdLocked()) if the Entry is borrowed currently
|
||||||
/// - Errors StoreEntry::new() might return
|
/// - 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());
|
let id = id.into_storeid()?.with_base(self.path().clone());
|
||||||
debug!("Retrieving copy of '{}'", id);
|
debug!("Retrieving copy of '{}'", id);
|
||||||
let entries = self.entries.write()
|
let entries = self.entries.write()
|
||||||
|
|
Loading…
Reference in a new issue