From 97741fd4ee84e353bd9bab53581f1b508901df99 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 18 Jun 2017 12:42:25 +0200 Subject: [PATCH] Remove unnecessary clone() call --- libimagstore/src/file_abstraction/inmemory.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libimagstore/src/file_abstraction/inmemory.rs b/libimagstore/src/file_abstraction/inmemory.rs index aadeb01e..134e39ec 100644 --- a/libimagstore/src/file_abstraction/inmemory.rs +++ b/libimagstore/src/file_abstraction/inmemory.rs @@ -62,11 +62,10 @@ impl FileAbstractionInstance for InMemoryFileAbstractionInstance { fn get_file_content(&mut self, _: StoreId) -> Result { 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()) }