Remove duplication

This commit is contained in:
Marcel Müller 2016-08-25 09:30:47 +02:00
parent f2f5e755f6
commit 820fa287a0
No known key found for this signature in database
GPG key ID: 84BD3634786D56CF

View file

@ -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");
},
}
}
}
}
}