Now returning duplicate database errors.

This commit is contained in:
2023-06-30 22:38:18 -04:00
parent e73fdbff75
commit c70c006abd
2 changed files with 22 additions and 1 deletions

View File

@@ -43,7 +43,10 @@ impl Cache {
pub fn commit(&mut self, data: Store) -> FromCache {
let store = self.data.get_mut(ENTRY).unwrap();
for name in data.list() {
store.add(name).unwrap();
match store.add(name) {
Ok(_) => (),
Err(err) => return FromCache::Error(err),
}
}
FromCache::Ok
}