From 820fa287a0c03cc80087465764e7136be4e89a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Thu, 25 Aug 2016 09:30:47 +0200 Subject: [PATCH] Remove duplication --- libimagstore/src/store.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 7d55f3ac..3f344f5c 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -687,21 +687,11 @@ impl Store { } else { match FileAbstraction::rename(&old_id.clone(), &new_id) { Err(e) => return Err(SEK::EntryRenameError.into_error_with_cause(Box::new(e))), - _ => { + Ok(_) => { debug!("Rename worked"); - }, - } - if hsmap.contains_key(&old_id) { - return Err(SE::new(SEK::EntryAlreadyBorrowed, None)); - } else { - match FileAbstraction::rename(&old_id, &new_id) { - Err(e) => return Err(SEK::EntryRenameError.into_error_with_cause(Box::new(e))), - _ => { - debug!("Rename worked"); - }, } } - } + } }