mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
fix db errors handle
This commit is contained in:
parent
be30ec660f
commit
57a8b5091f
2 changed files with 13 additions and 8 deletions
|
|
@ -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`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue