diff --git a/src/profile/bookmark.rs b/src/profile/bookmark.rs index 222ccd75..59c4a3b5 100644 --- a/src/profile/bookmark.rs +++ b/src/profile/bookmark.rs @@ -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` diff --git a/src/profile/bookmark/database.rs b/src/profile/bookmark/database.rs index 0a4866c4..a361420c 100644 --- a/src/profile/bookmark/database.rs +++ b/src/profile/bookmark/database.rs @@ -28,10 +28,10 @@ impl Database { // Getters /// Get bookmark records from database with optional filter by `request` - pub fn records(&self, request: Option<&str>) -> Vec