get_entry() already asserts the entry is not borrowed

This commit is contained in:
Julian Ganz 2016-01-25 12:31:22 +01:00
parent acfbb16eb2
commit 9760f72e79

View file

@ -152,11 +152,6 @@ impl Store {
let mut entries = hsmap.unwrap(); let mut entries = hsmap.unwrap();
let mut store_entry = entries.entry(id.clone()).or_insert_with(|| StoreEntry::new(id.clone())); let mut store_entry = entries.entry(id.clone()).or_insert_with(|| StoreEntry::new(id.clone()));
// make sure only one user gets a borrowed entry at a time
if store_entry.is_borrowed() {
return Err(StoreError::new(StoreErrorKind::IdLocked, None));
}
// TODO: update the store entry status // TODO: update the store entry status
// make a file lock entry from the store entry // make a file lock entry from the store entry