fix db errors handle

This commit is contained in:
yggverse 2024-11-14 14:06:03 +02:00
parent be30ec660f
commit 57a8b5091f
2 changed files with 13 additions and 8 deletions

View file

@ -25,10 +25,15 @@ impl Bookmark {
let memory = Rc::new(Memory::new());
// Build initial index
for record in database.records(None) {
if memory.add(record.request, record.id).is_err() {
todo!()
match database.records(None) {
Ok(records) => {
for record in records {
if memory.add(record.request, record.id).is_err() {
todo!()
}
}
}
Err(reason) => todo!("{reason}"),
}
// Return new `Self`