From d293dc911a0f334d75a0103455d08d1df03e0a40 Mon Sep 17 00:00:00 2001 From: k88hudson-cfa Date: Fri, 29 Nov 2024 18:58:00 -0800 Subject: [PATCH] review comments --- src/people.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/people.rs b/src/people.rs index 0591e63..2fd9cbf 100644 --- a/src/people.rs +++ b/src/people.rs @@ -1125,13 +1125,10 @@ impl ContextPeopleExt for Context { // First, update indexes { - let mut index_container = self.get_data_container(PeoplePlugin) - .expect("PeoplePlugin is not initialized; make sure you add a person before accessing properties") - .property_indexes - .borrow_mut(); - - for (typeid, index) in index_container.iter_mut() { - if type_ids.contains(typeid) { + let data_container = self.get_data_container(PeoplePlugin) + .expect("PeoplePlugin is not initialized; make sure you add a person before accessing properties"); + for t in &type_ids { + if let Some(mut index) = data_container.get_index_ref_mut(*t) { index.index_unindexed_people(self); } }