moving to using a filter function for getting the item

This commit is contained in:
Chris Cochrun 2024-10-09 14:47:07 -05:00
parent f3c3e98e16
commit 0bfa2c6089
6 changed files with 16 additions and 18 deletions

View file

@ -88,7 +88,7 @@ mod test {
let mut presentation_model: Model<Presentation> =
Model::default();
presentation_model.load_from_db();
if let Some(presentation) = presentation_model.get_item(10) {
if let Some(presentation) = presentation_model.get_item(|p| p.id == 10) {
let test_presentation = test_presentation();
assert_eq!(&test_presentation, presentation);
} else {