insight-chat: code-review polish on get_faces_in_photo

- Drop redundant `use anyhow::Context` inside has_any_faces (already
  imported at the module level).
- Drop dead `.unwrap_or("?")` on bound faces — the vec is filtered to
  is_some() so the fallback can never fire.
- Reorder the face_dao constructor param + initializer to match the
  struct declaration (between tag_dao and knowledge_dao). Update both
  state.rs call sites and populate_knowledge.rs to match.
- Hold face_dao lock once across the library-resolver loop instead of
  reacquiring per iteration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cameron Cordes
2026-05-07 17:48:22 -04:00
parent b64a5bec28
commit 6f0c15d0c5
4 changed files with 17 additions and 15 deletions

View File

@@ -201,8 +201,8 @@ async fn main() -> anyhow::Result<()> {
location_dao,
search_dao,
tag_dao,
knowledge_dao,
face_dao,
knowledge_dao,
all_libs.clone(),
);