Merge pull request #669 from TheNeikos/fix-code_dup

Remove duplication
This commit is contained in:
Matthias Beyer 2016-08-25 10:15:13 +02:00 committed by GitHub
commit ab4a75421d

View file

@ -687,18 +687,8 @@ 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");
},
}
}
}