Remove duplication
This commit is contained in:
parent
f2f5e755f6
commit
820fa287a0
1 changed files with 2 additions and 12 deletions
|
@ -687,21 +687,11 @@ impl Store {
|
||||||
} else {
|
} else {
|
||||||
match FileAbstraction::rename(&old_id.clone(), &new_id) {
|
match FileAbstraction::rename(&old_id.clone(), &new_id) {
|
||||||
Err(e) => return Err(SEK::EntryRenameError.into_error_with_cause(Box::new(e))),
|
Err(e) => return Err(SEK::EntryRenameError.into_error_with_cause(Box::new(e))),
|
||||||
_ => {
|
Ok(_) => {
|
||||||
debug!("Rename worked");
|
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");
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue