summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2017-06-18 20:03:29 +0200
committerGitHub <noreply@github.com>2017-06-18 20:03:29 +0200
commit2c97d6f1946d0f05bb95ca8d2ed09d093c4e6e92 (patch)
tree0d1323beb75c785a610c16bad74e7222b7bb039f
parentf8ed6794c2fc54ab4b61065835416a32eef74557 (diff)
parent97741fd4ee84e353bd9bab53581f1b508901df99 (diff)
downloadimag-2c97d6f1946d0f05bb95ca8d2ed09d093c4e6e92.zip
imag-2c97d6f1946d0f05bb95ca8d2ed09d093c4e6e92.tar.gz
Merge pull request #974 from matthiasbeyer/libimagstore/embellishments
Remove unnecessary clone() call
-rw-r--r--libimagstore/src/file_abstraction/inmemory.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/libimagstore/src/file_abstraction/inmemory.rs b/libimagstore/src/file_abstraction/inmemory.rs
index fef1bff..57ca241 100644
--- a/libimagstore/src/file_abstraction/inmemory.rs
+++ b/libimagstore/src/file_abstraction/inmemory.rs
@@ -64,11 +64,10 @@ impl FileAbstractionInstance for InMemoryFileAbstractionInstance {
fn get_file_content(&mut self, _: StoreId) -> Result<Entry, SE> {
debug!("Getting lazy file: {:?}", self);
- let p = self.absent_path.clone();
match self.fs_abstraction.lock() {
Ok(mut mtx) => {
mtx.get_mut()
- .get(&p)
+ .get(&self.absent_path)
.cloned()
.ok_or(SEK::FileNotFound.into_error())
}