Skip to content

Refactor: remove duplicate row mappers and inline single-use helpers#18

Merged
asiniscalchi merged 2 commits into
mainfrom
refactor/remove-duplicate-row-mappers
Apr 29, 2026
Merged

Refactor: remove duplicate row mappers and inline single-use helpers#18
asiniscalchi merged 2 commits into
mainfrom
refactor/remove-duplicate-row-mappers

Conversation

@asiniscalchi

Copy link
Copy Markdown
Owner
  • Extract map_entry() in repository.rs, eliminating three identical JournalEntry row mapping closures across fetch_recent, fetch_today, and fetch_by_ids
  • Extract map_search_result() in embedding/repository.rs, eliminating an identical EmbeddingSearchResult row mapping closure in search and search_for_user
  • Inline log_daily_review_service_error(), which wrapped a single error! call used in exactly one place
  • Add search_unavailable_response() to search.rs and use it in service.rs, replacing an inline string literal to follow the same pattern as all other response messages

asiniscalchi and others added 2 commits April 29, 2026 21:20
- Extract map_entry() in repository.rs, eliminating three identical
  JournalEntry row mapping closures across fetch_recent, fetch_today,
  and fetch_by_ids
- Extract map_search_result() in embedding/repository.rs, eliminating
  an identical EmbeddingSearchResult row mapping closure in search and
  search_for_user
- Inline log_daily_review_service_error(), which wrapped a single
  error! call used in exactly one place
- Add search_unavailable_response() to search.rs and use it in
  service.rs, replacing an inline string literal to follow the same
  pattern as all other response messages

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@asiniscalchi asiniscalchi merged commit cba806a into main Apr 29, 2026
3 checks passed
@asiniscalchi asiniscalchi deleted the refactor/remove-duplicate-row-mappers branch April 29, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant