Merge pull request #974 from matthiasbeyer/libimagstore/embellishments

Remove unnecessary clone() call
This commit is contained in:
Matthias Beyer 2017-06-18 20:03:29 +02:00 committed by GitHub
commit 2c97d6f194

View file

@ -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())
}